From 7bce9060e220f56014fc135c71f62bc85364aef3 Mon Sep 17 00:00:00 2001 From: Andrey Breslav Date: Mon, 19 May 2014 19:27:21 +0400 Subject: [PATCH] Better handling of PackageTypes in KotlinBuiltIns --- .../org/jetbrains/jet/lang/types/lang/KotlinBuiltIns.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/core/descriptors/src/org/jetbrains/jet/lang/types/lang/KotlinBuiltIns.java b/core/descriptors/src/org/jetbrains/jet/lang/types/lang/KotlinBuiltIns.java index 6122ef22b9b..28d40aa5d2d 100644 --- a/core/descriptors/src/org/jetbrains/jet/lang/types/lang/KotlinBuiltIns.java +++ b/core/descriptors/src/org/jetbrains/jet/lang/types/lang/KotlinBuiltIns.java @@ -727,7 +727,8 @@ public class KotlinBuiltIns { } 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()) { if (isFunctionType(superType)) return true; @@ -742,7 +743,8 @@ public class KotlinBuiltIns { } 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()) { if (isExtensionFunctionType(superType)) return true;