equal
deleted
inserted
replaced
88 private final Types types; |
88 private final Types types; |
89 private final TypeAnnotations typeAnnotations; |
89 private final TypeAnnotations typeAnnotations; |
90 private final JCDiagnostic.Factory diags; |
90 private final JCDiagnostic.Factory diags; |
91 private final JavaFileManager fileManager; |
91 private final JavaFileManager fileManager; |
92 private final Source source; |
92 private final Source source; |
|
93 private final Target target; |
93 private final Profile profile; |
94 private final Profile profile; |
94 private final boolean warnOnAnyAccessToMembers; |
95 private final boolean warnOnAnyAccessToMembers; |
95 |
96 |
96 // The set of lint options currently in effect. It is initialized |
97 // The set of lint options currently in effect. It is initialized |
97 // from the context, and then is set/reset as needed by Attr as it |
98 // from the context, and then is set/reset as needed by Attr as it |
128 Options options = Options.instance(context); |
129 Options options = Options.instance(context); |
129 lint = Lint.instance(context); |
130 lint = Lint.instance(context); |
130 fileManager = context.get(JavaFileManager.class); |
131 fileManager = context.get(JavaFileManager.class); |
131 |
132 |
132 source = Source.instance(context); |
133 source = Source.instance(context); |
|
134 target = Target.instance(context); |
133 warnOnAnyAccessToMembers = options.isSet("warnOnAccessToMembers"); |
135 warnOnAnyAccessToMembers = options.isSet("warnOnAccessToMembers"); |
134 |
136 |
135 Target target = Target.instance(context); |
137 Target target = Target.instance(context); |
136 syntheticNameChar = target.syntheticNameChar(); |
138 syntheticNameChar = target.syntheticNameChar(); |
137 |
139 |
999 (!Feature.SIMPLIFIED_VARARGS.allowedInSource(source) || |
1001 (!Feature.SIMPLIFIED_VARARGS.allowedInSource(source) || |
1000 sym.baseSymbol().attribute(syms.trustMeType.tsym) == null || |
1002 sym.baseSymbol().attribute(syms.trustMeType.tsym) == null || |
1001 !isTrustMeAllowedOnMethod(sym))) { |
1003 !isTrustMeAllowedOnMethod(sym))) { |
1002 warnUnchecked(env.tree.pos(), Warnings.UncheckedGenericArrayCreation(argtype)); |
1004 warnUnchecked(env.tree.pos(), Warnings.UncheckedGenericArrayCreation(argtype)); |
1003 } |
1005 } |
1004 if ((sym.baseSymbol().flags() & SIGNATURE_POLYMORPHIC) == 0) { |
1006 TreeInfo.setVarargsElement(env.tree, types.elemtype(argtype)); |
1005 TreeInfo.setVarargsElement(env.tree, types.elemtype(argtype)); |
1007 } |
1006 } |
1008 if ((sym.flags() & SIGNATURE_POLYMORPHIC) != 0 && !target.hasMethodHandles()) { |
|
1009 log.error(env.tree, Errors.BadTargetSigpolyCall(target, Target.JDK1_7)); |
1007 } |
1010 } |
1008 return owntype; |
1011 return owntype; |
1009 } |
1012 } |
1010 //where |
1013 //where |
1011 private void assertConvertible(JCTree tree, Type actual, Type formal, Warner warn) { |
1014 private void assertConvertible(JCTree tree, Type actual, Type formal, Warner warn) { |