src/jdk.compiler/share/classes/com/sun/tools/javac/comp/TypeEnter.java
changeset 53275 f5e601ad26a8
parent 50374 2d0647b9ac18
child 58109 ee07de0d2c16
child 58713 ad69fd32778e
equal deleted inserted replaced
53274:cf80666df79a 53275:f5e601ad26a8
     1 /*
     1 /*
     2  * Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2003, 2019, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.  Oracle designates this
     7  * published by the Free Software Foundation.  Oracle designates this
   829                     chk.checkNotRepeated(iface.pos(), types.erasure(it), interfaceSet);
   829                     chk.checkNotRepeated(iface.pos(), types.erasure(it), interfaceSet);
   830             }
   830             }
   831 
   831 
   832             annotate.annotateLater(tree.mods.annotations, baseEnv,
   832             annotate.annotateLater(tree.mods.annotations, baseEnv,
   833                         sym, tree.pos());
   833                         sym, tree.pos());
   834 
   834             attr.attribTypeVariables(tree.typarams, baseEnv, false);
   835             attr.attribTypeVariables(tree.typarams, baseEnv);
   835 
   836             for (JCTypeParameter tp : tree.typarams)
   836             for (JCTypeParameter tp : tree.typarams)
   837                 annotate.queueScanTreeAndTypeAnnotate(tp, baseEnv, sym, tree.pos());
   837                 annotate.queueScanTreeAndTypeAnnotate(tp, baseEnv, sym, tree.pos());
   838 
   838 
   839             // check that no package exists with same fully qualified name,
   839             // check that no package exists with same fully qualified name,
   840             // but admit classes in the unnamed package which have the same
   840             // but admit classes in the unnamed package which have the same
   935                 VarSymbol superSym =
   935                 VarSymbol superSym =
   936                     new VarSymbol(FINAL | HASINIT, names._super,
   936                     new VarSymbol(FINAL | HASINIT, names._super,
   937                                   ct.supertype_field, sym);
   937                                   ct.supertype_field, sym);
   938                 superSym.pos = Position.FIRSTPOS;
   938                 superSym.pos = Position.FIRSTPOS;
   939                 env.info.scope.enter(superSym);
   939                 env.info.scope.enter(superSym);
       
   940             }
       
   941 
       
   942             if (!tree.typarams.isEmpty()) {
       
   943                 for (JCTypeParameter tvar : tree.typarams) {
       
   944                     chk.checkNonCyclic(tvar, (TypeVar)tvar.type);
       
   945                 }
   940             }
   946             }
   941 
   947 
   942             finishClass(tree, env);
   948             finishClass(tree, env);
   943 
   949 
   944             if (allowTypeAnnos) {
   950             if (allowTypeAnnos) {