Better handling of PackageTypes in KotlinBuiltIns
This commit is contained in:
@@ -727,7 +727,8 @@ public class KotlinBuiltIns {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public boolean isFunctionType(@NotNull JetType type) {
|
public boolean isFunctionType(@NotNull JetType type) {
|
||||||
if (!(type instanceof PackageType) && setContainsClassOf(functionClassesSet, type)) return true;
|
if (type instanceof PackageType) return false;
|
||||||
|
if (setContainsClassOf(functionClassesSet, type)) return true;
|
||||||
|
|
||||||
for (JetType superType : type.getConstructor().getSupertypes()) {
|
for (JetType superType : type.getConstructor().getSupertypes()) {
|
||||||
if (isFunctionType(superType)) return true;
|
if (isFunctionType(superType)) return true;
|
||||||
@@ -742,7 +743,8 @@ public class KotlinBuiltIns {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public boolean isExtensionFunctionType(@NotNull JetType type) {
|
public boolean isExtensionFunctionType(@NotNull JetType type) {
|
||||||
if (!(type instanceof PackageType) && setContainsClassOf(extensionFunctionClassesSet, type)) return true;
|
if (type instanceof PackageType) return false;
|
||||||
|
if (setContainsClassOf(extensionFunctionClassesSet, type)) return true;
|
||||||
|
|
||||||
for (JetType superType : type.getConstructor().getSupertypes()) {
|
for (JetType superType : type.getConstructor().getSupertypes()) {
|
||||||
if (isExtensionFunctionType(superType)) return true;
|
if (isExtensionFunctionType(superType)) return true;
|
||||||
|
|||||||
Reference in New Issue
Block a user