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

Print this page

        

*** 37,47 **** import com.sun.tools.javac.tree.*; import com.sun.tools.javac.tree.JCTree.*; import com.sun.tools.javac.util.*; /** ! * Support for "Minimal Value Types" : Process classes annotated with @DeriveValueType - * All semantic checks are centralized in this place so that we can blow them all away when * moving to "Maximal Value Types". * * see: http://cr.openjdk.java.net/~jrose/values/shady-values.html * --- 37,47 ---- import com.sun.tools.javac.tree.*; import com.sun.tools.javac.tree.JCTree.*; import com.sun.tools.javac.util.*; /** ! * Support for "Minimal Value Types" : Process classes annotated with @ValueCapableClass - * All semantic checks are centralized in this place so that we can blow them all away when * moving to "Maximal Value Types". * * see: http://cr.openjdk.java.net/~jrose/values/shady-values.html *
*** 80,90 **** boolean oldInValue = inValue; try { inValue = false; for (List<JCAnnotation> al = tree.mods.annotations; !al.isEmpty(); al = al.tail) { JCAnnotation a = al.head; ! if (a.annotationType.type == syms.deriveValueType && a.args.isEmpty()) { inValue = true; tree.sym.flags_field |= Flags.VALUE_CAPABLE; break; } } --- 80,90 ---- boolean oldInValue = inValue; try { inValue = false; for (List<JCAnnotation> al = tree.mods.annotations; !al.isEmpty(); al = al.tail) { JCAnnotation a = al.head; ! if (a.annotationType.type == syms.valueCapableClass && a.args.isEmpty()) { inValue = true; tree.sym.flags_field |= Flags.VALUE_CAPABLE; break; } }