KT-16669 Exception in PSI2IR on type alias constructor in supertypes list

This commit is contained in:
Dmitry Petrov
2017-03-06 16:46:22 +03:00
parent e4683a1e9f
commit 4ba8268a29
5 changed files with 55 additions and 5 deletions
@@ -0,0 +1,7 @@
open class Cell<T>(val value: T)
typealias CT<T> = Cell<T>
typealias CStr = Cell<String>
class C1 : CT<String>("O")
class C2 : CStr("K")
@@ -0,0 +1,31 @@
FILE /delegatingConstructorCallToTypeAliasConstructor.kt
CLASS CLASS Cell
CONSTRUCTOR public constructor Cell<T>(value: T)
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'constructor Any()'
INSTANCE_INITIALIZER_CALL classDescriptor='Cell'
PROPERTY public final val value: T
FIELD PROPERTY_BACKING_FIELD public final val value: T
EXPRESSION_BODY
GET_VAR 'value-parameter value: T' type=T origin=INITIALIZE_PROPERTY_FROM_PARAMETER
FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-value>(): T
BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-value>(): T'
GET_FIELD 'value: T' type=T origin=null
receiver: GET_VAR '<receiver: Cell>' type=Cell<T> origin=null
TYPEALIAS typealias CT = Cell<T> type=Cell<T>
TYPEALIAS typealias CStr = Cell<String> type=Cell<kotlin.String>
CLASS CLASS C1
CONSTRUCTOR public constructor C1()
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'constructor Cell(T)'
value: TYPE_OP type=T origin=IMPLICIT_CAST typeOperand=T
CONST String type=kotlin.String value='O'
INSTANCE_INITIALIZER_CALL classDescriptor='C1'
CLASS CLASS C2
CONSTRUCTOR public constructor C2()
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'constructor Cell(T)'
value: TYPE_OP type=T origin=IMPLICIT_CAST typeOperand=T
CONST String type=kotlin.String value='K'
INSTANCE_INITIALIZER_CALL classDescriptor='C2'