< prev index next >

src/jdk.compiler/share/classes/com/sun/tools/javac/code/Types.java

Print this page

        

*** 87,97 **** protected static final Context.Key<Types> typesKey = new Context.Key<>(); final Symtab syms; final JavacMessages messages; final Names names; - final boolean allowObjectToPrimitiveCast; final boolean allowDefaultMethods; final boolean mapCapturesToBounds; final Check chk; final Enter enter; JCDiagnostic.Factory diags; --- 87,96 ----
*** 111,121 **** protected Types(Context context) { context.put(typesKey, this); syms = Symtab.instance(context); names = Names.instance(context); Source source = Source.instance(context); - allowObjectToPrimitiveCast = Feature.OBJECT_TO_PRIMITIVE_CAST.allowedInSource(source); allowDefaultMethods = Feature.DEFAULT_METHODS.allowedInSource(source); mapCapturesToBounds = Feature.MAP_CAPTURES_TO_BOUNDS.allowedInSource(source); chk = Check.instance(context); enter = Enter.instance(context); capturedName = names.fromString("<captured wildcard>"); --- 110,119 ----
*** 1637,1648 **** if (t == s) return true; if (t.isPrimitive() != s.isPrimitive()) { t = skipTypeVars(t, false); return (isConvertible(t, s, warn) ! || (allowObjectToPrimitiveCast && ! s.isPrimitive() && isSubtype(boxedClass(s).type, t))); } if (warn != warnStack.head) { try { warnStack = warnStack.prepend(warn); --- 1635,1645 ---- if (t == s) return true; if (t.isPrimitive() != s.isPrimitive()) { t = skipTypeVars(t, false); return (isConvertible(t, s, warn) ! || (s.isPrimitive() && isSubtype(boxedClass(s).type, t))); } if (warn != warnStack.head) { try { warnStack = warnStack.prepend(warn);
< prev index next >