1859 t.rank_field = -1; |
1859 t.rank_field = -1; |
1860 } |
1860 } |
1861 |
1861 |
1862 /** |
1862 /** |
1863 * Same as {@link #setBounds(Type.TypeVar,List,Type)}, except that |
1863 * Same as {@link #setBounds(Type.TypeVar,List,Type)}, except that |
1864 * third parameter is computed directly. Note that this test |
1864 * third parameter is computed directly, as follows: if all |
1865 * might cause a symbol completion. Hence, this version of |
1865 * all bounds are interface types, the computed supertype is Object, |
|
1866 * otherwise the supertype is simply left null (in this case, the supertype |
|
1867 * is assumed to be the head of the bound list passed as second argument). |
|
1868 * Note that this check might cause a symbol completion. Hence, this version of |
1866 * setBounds may not be called during a classfile read. |
1869 * setBounds may not be called during a classfile read. |
1867 */ |
1870 */ |
1868 public void setBounds(TypeVar t, List<Type> bounds) { |
1871 public void setBounds(TypeVar t, List<Type> bounds) { |
1869 Type supertype = (bounds.head.tsym.flags() & INTERFACE) != 0 ? |
1872 Type supertype = (bounds.head.tsym.flags() & INTERFACE) != 0 ? |
1870 supertype(bounds.head) : null; |
1873 syms.objectType : null; |
1871 setBounds(t, bounds, supertype); |
1874 setBounds(t, bounds, supertype); |
1872 t.rank_field = -1; |
1875 t.rank_field = -1; |
1873 } |
1876 } |
1874 // </editor-fold> |
1877 // </editor-fold> |
1875 |
1878 |