< prev index next >

src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Enter.java

Print this page

        

@@ -398,10 +398,13 @@
         if (owner.kind == PCK) {
             // We are seeing a toplevel class.
             PackageSymbol packge = (PackageSymbol)owner;
             for (Symbol q = packge; q != null && q.kind == PCK; q = q.owner)
                 q.flags_field |= EXISTS;
+            if ((tree.mods.flags & Flags.RECORD) != 0) {
+                tree.mods.flags &= ~Flags.STATIC;
+            }
             c = syms.enterClass(env.toplevel.modle, tree.name, packge);
             packge.members().enterIfAbsent(c);
             if ((tree.mods.flags & PUBLIC) != 0 && !classNameMatchesFileName(c, env)) {
                 KindName topElement = KindName.CLASS;
                 if ((tree.mods.flags & ENUM) != 0) {
< prev index next >