src/share/classes/com/sun/tools/javac/comp/Attr.java

changeset 89
b6d5f53b3b29
parent 82
dc4744d13247
child 94
6542933af8f4
equal deleted inserted replaced
88:05684554f040 89:b6d5f53b3b29
77 final TreeMaker make; 77 final TreeMaker make;
78 final ConstFold cfolder; 78 final ConstFold cfolder;
79 final Enter enter; 79 final Enter enter;
80 final Target target; 80 final Target target;
81 final Types types; 81 final Types types;
82 final JCDiagnostic.Factory diags;
82 final Annotate annotate; 83 final Annotate annotate;
83 84
84 public static Attr instance(Context context) { 85 public static Attr instance(Context context) {
85 Attr instance = context.get(attrKey); 86 Attr instance = context.get(attrKey);
86 if (instance == null) 87 if (instance == null)
100 make = TreeMaker.instance(context); 101 make = TreeMaker.instance(context);
101 enter = Enter.instance(context); 102 enter = Enter.instance(context);
102 cfolder = ConstFold.instance(context); 103 cfolder = ConstFold.instance(context);
103 target = Target.instance(context); 104 target = Target.instance(context);
104 types = Types.instance(context); 105 types = Types.instance(context);
106 diags = JCDiagnostic.Factory.instance(context);
105 annotate = Annotate.instance(context); 107 annotate = Annotate.instance(context);
106 108
107 Options options = Options.instance(context); 109 Options options = Options.instance(context);
108 110
109 Source source = Source.instance(context); 111 Source source = Source.instance(context);
2417 && types.isSubtypeUnchecked(actual, types.interfaces(formal), warn)) 2419 && types.isSubtypeUnchecked(actual, types.interfaces(formal), warn))
2418 return; 2420 return;
2419 2421
2420 if (false) { 2422 if (false) {
2421 // TODO: make assertConvertible work 2423 // TODO: make assertConvertible work
2422 chk.typeError(tree.pos(), JCDiagnostic.fragment("incompatible.types"), actual, formal); 2424 chk.typeError(tree.pos(), diags.fragment("incompatible.types"), actual, formal);
2423 throw new AssertionError("Tree: " + tree 2425 throw new AssertionError("Tree: " + tree
2424 + " actual:" + actual 2426 + " actual:" + actual
2425 + " formal: " + formal); 2427 + " formal: " + formal);
2426 } 2428 }
2427 } 2429 }

mercurial