Disconnect loops between upper bounds of type parameters

#KT-9759 Fixed
This commit is contained in:
Denis Zharkov
2015-10-27 16:06:32 +03:00
parent 9b4ad1466a
commit b6f724cf58
25 changed files with 279 additions and 51 deletions
@@ -17,6 +17,7 @@
package org.jetbrains.kotlin.serialization.deserialization.descriptors
import org.jetbrains.kotlin.descriptors.SourceElement
import org.jetbrains.kotlin.descriptors.SupertypeLoopChecker
import org.jetbrains.kotlin.descriptors.annotations.AnnotationWithTarget
import org.jetbrains.kotlin.descriptors.annotations.Annotations
import org.jetbrains.kotlin.descriptors.impl.AbstractLazyTypeParameterDescriptor
@@ -52,4 +53,9 @@ class DeserializedTypeParameterDescriptor(
c.typeDeserializer.type(it, Annotations.EMPTY)
}
}
override fun getSupertypeLoopChecker() = SupertypeLoopChecker.EMPTY
override fun reportCycleError(type: KotlinType) = throw IllegalStateException(
"There should be no cycles for deserialized type parameters, but found for: $this")
}