Fix default type of static classes inside parametrized parents
Default type of LazySubstitutingClassDescriptor is not lazy. However, most of default types are, and there is an optimization in KotlinTypeFactory, which uses default type for simple type without type arguments and/or annotations. LazySubstitutingClassDescriptor's default type creates simple type with factory, which may therefore cause recursion. #KT-34029 Fixed
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
open class MyClass<T> {
|
||||
object MyObject : MyClass<Boolean>() { }
|
||||
}
|
||||
|
||||
val foo1 = MyClass.MyObject // it's ok
|
||||
val foo2 = <!FUNCTION_CALL_EXPECTED!>MyClass<Boolean><!>.<!NESTED_CLASS_ACCESSED_VIA_INSTANCE_REFERENCE!>MyObject<!> // here's stofl
|
||||
Reference in New Issue
Block a user