Filter out non-builtin package fragments from module when needed

In subsequent commits, a JVM module will be able to have up to two package
fragments for a given package FQ name. For example, for package "kotlin" in
kotlin-runtime.jar there will be a LazyJavaPackageFragment with binary
(Kotlin+Java) dependencies, and a BuiltInsPackageFragment for built-ins
metadata (which is loaded from kotlin/kotlin.kotlin_builtins)
This commit is contained in:
Alexander Udalov
2016-10-19 13:17:11 +03:00
parent 9ce211fe87
commit 4e7542b07d
5 changed files with 9 additions and 6 deletions
@@ -119,7 +119,7 @@ object BuiltinSpecialBridgesUtil {
): Boolean {
if (BuiltinMethodsWithSpecialGenericSignature.getDefaultValueForOverriddenBuiltinFunction(this) == null) return false
val builtin = getOverriddenBuiltinReflectingJvmDescriptor()!!
val builtin = getOverriddenBuiltinReflectingJvmDescriptor() ?: error("Overridden built-in member not found: $this")
return signatureByDescriptor(this) == signatureByDescriptor(builtin)
}
}