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 |