Fixed duplication of some generic functions in code completion

This commit is contained in:
Valentin Kipyatkov
2015-05-08 12:07:51 +03:00
parent ce3492f270
commit 09f478fc0f
5 changed files with 48 additions and 4 deletions
@@ -97,3 +97,9 @@ public fun JetType.isArrayOfJavaLangClass(): Boolean =
KotlinBuiltIns.isArray(this) && getArguments().firstOrNull()?.getType()?.isJavaLangClass() ?: false
public fun JetType.isJavaLangClassOrArray(): Boolean = isJavaLangClass() || isArrayOfJavaLangClass()
public fun JetTypeChecker.equalTypesOrNulls(type1: JetType?, type2: JetType?): Boolean {
if (type1 identityEquals type2) return true
if (type1 == null || type2 == null) return false
return equalTypes(type1, type2)
}