forked from JavaTX/JavaCompilerCore
I don't know why isFunctionalInterface returns true on things that aren't even interfaces but here we go
This commit is contained in:
parent
63493ed0f7
commit
ba8810e5df
@ -305,8 +305,11 @@ public class Codegen {
|
||||
|
||||
private boolean isFunctionalInterface(TargetType type) {
|
||||
if (type instanceof TargetFunNType) return true;
|
||||
if (type instanceof TargetRefType)
|
||||
return compiler.getClass(new JavaClassName(type.name())).isFunctionalInterface();
|
||||
if (type instanceof TargetRefType) {
|
||||
var clazz = compiler.getClass(new JavaClassName(type.name()));
|
||||
return (clazz.getModifiers() & Modifier.INTERFACE) != 0 && clazz.isFunctionalInterface();
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user