FIR: resolve constructors via type-aliases
This commit is contained in:
committed by
Mikhail Glukhikh
parent
aa077b42e9
commit
e6ab38a583
@@ -0,0 +1,13 @@
|
||||
class A(i: Int)
|
||||
|
||||
typealias AA = A
|
||||
|
||||
class B<T>(t: T)
|
||||
|
||||
typealias BB<U> = B<U>
|
||||
|
||||
fun main() {
|
||||
val x = AA(1)
|
||||
val y = BB<String>("bb")
|
||||
}
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
FILE: typeAliasConstructor.kt
|
||||
public final class A : R|kotlin/Any| {
|
||||
public constructor(i: R|kotlin/Int|): R|A| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
}
|
||||
public final typealias AA = R|A|
|
||||
public final class B<T> : R|kotlin/Any| {
|
||||
public constructor<T>(t: R|T|): R|B<T>| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
}
|
||||
public final typealias BB<U> = R|B<U>|
|
||||
public final fun main(): R|kotlin/Unit| {
|
||||
lval x: R|A| = R|/A.A|(Int(1))
|
||||
lval y: <ERROR TYPE REF: Inapplicable(INAPPLICABLE): [/B.B]> = <Inapplicable(INAPPLICABLE): [/B.B]>#<R|kotlin/String|>(String(bb))
|
||||
}
|
||||
Reference in New Issue
Block a user