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

changeset 1579
0baaae675b19
parent 1555
762d0af062f5
child 1588
2620c953e9fe
equal deleted inserted replaced
1577:88286a36bb34 1579:0baaae675b19
2230 * from the perspective of the implementing class 2230 * from the perspective of the implementing class
2231 */ 2231 */
2232 void checkFunctionalInterface(JCTree tree, Type funcInterface) { 2232 void checkFunctionalInterface(JCTree tree, Type funcInterface) {
2233 ClassType c = new ClassType(Type.noType, List.<Type>nil(), null); 2233 ClassType c = new ClassType(Type.noType, List.<Type>nil(), null);
2234 ClassSymbol csym = new ClassSymbol(0, names.empty, c, syms.noSymbol); 2234 ClassSymbol csym = new ClassSymbol(0, names.empty, c, syms.noSymbol);
2235 c.interfaces_field = List.of(funcInterface); 2235 c.interfaces_field = List.of(types.removeWildcards(funcInterface));
2236 c.supertype_field = syms.objectType; 2236 c.supertype_field = syms.objectType;
2237 c.tsym = csym; 2237 c.tsym = csym;
2238 csym.members_field = new Scope(csym); 2238 csym.members_field = new Scope(csym);
2239 Symbol descSym = types.findDescriptorSymbol(funcInterface.tsym);
2240 Type descType = types.findDescriptorType(funcInterface);
2241 csym.members_field.enter(new MethodSymbol(PUBLIC, descSym.name, descType, csym));
2239 csym.completer = null; 2242 csym.completer = null;
2240 checkImplementations(tree, csym, csym); 2243 checkImplementations(tree, csym, csym);
2241 } 2244 }
2242 2245
2243 /** Check that all methods which implement some 2246 /** Check that all methods which implement some

mercurial