Raw FIR: copy class type-parameters into constructors properly
This commit is contained in:
committed by
Mikhail Glukhikh
parent
9cef9e4056
commit
77817cb750
+3
-3
@@ -1,5 +1,5 @@
|
||||
open class Base<T>(val x: T)
|
||||
open class Base<T1>(val x: T1)
|
||||
|
||||
class Derived<T : Any>(x: T) : Base<T>(x)
|
||||
class Derived<T2 : Any>(x: T2) : Base<T2>(x)
|
||||
|
||||
fun <T : Any> create(x: T): Derived<T> = Derived(x)
|
||||
fun <T3 : Any> create(x: T3) /* Derived<T3> */ = Derived(x)
|
||||
+9
-9
@@ -1,19 +1,19 @@
|
||||
FILE: derivedClass.kt
|
||||
public open class Base<T> : R|kotlin/Any| {
|
||||
public constructor<T>(x: R|T|): R|Base<T>| {
|
||||
public open class Base<T1> : R|kotlin/Any| {
|
||||
public constructor<T1>(x: R|T1|): R|Base<T1>| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
public final val x: R|T| = R|<local>/x|
|
||||
public get(): R|T|
|
||||
public final val x: R|T1| = R|<local>/x|
|
||||
public get(): R|T1|
|
||||
|
||||
}
|
||||
public final class Derived<T : R|kotlin/Any|> : R|Base<T>| {
|
||||
public constructor<T : R|kotlin/Any|>(x: R|T|): R|Derived<T>| {
|
||||
super<R|Base<T>|>(R|<local>/x|)
|
||||
public final class Derived<T2 : R|kotlin/Any|> : R|Base<T2>| {
|
||||
public constructor<T2 : R|kotlin/Any|>(x: R|T2|): R|Derived<T2>| {
|
||||
super<R|Base<T2>|>(R|<local>/x|)
|
||||
}
|
||||
|
||||
}
|
||||
public final fun <T : R|kotlin/Any|> create(x: R|T|): R|Derived<T>| {
|
||||
^create R|/Derived.Derived|(R|<local>/x|)
|
||||
public final fun <T3 : R|kotlin/Any|> create(x: R|T3|): R|Derived<T3>| {
|
||||
^create R|/Derived.Derived|<R|T3|>(R|<local>/x|)
|
||||
}
|
||||
|
||||
+1
-1
@@ -15,5 +15,5 @@ FILE: typeAliasConstructor.kt
|
||||
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))
|
||||
lval y: R|B<kotlin/String>| = R|/B.B|<R|kotlin/String|>(String(bb))
|
||||
}
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
FILE: complexTypes.kt
|
||||
public final class C<T, out S> : R|kotlin/Any| {
|
||||
public constructor<T, out S>(): R|a/b/C<T, S>| {
|
||||
public constructor<T, S>(): R|a/b/C<T, S>| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
public final inner class D<R, in P> : R|kotlin/Any| {
|
||||
public constructor<R, in P>(): R|a/b/C.D<R, P>| {
|
||||
public constructor<R, P>(): R|a/b/C.D<R, P>| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ FILE: typeParameters.kt
|
||||
public final typealias StringList = R|List<out kotlin/String>|
|
||||
public final typealias AnyList = R|List<*>|
|
||||
public abstract class AbstractList<out T : R|kotlin/Any|> : R|List<T>| {
|
||||
public constructor<out T : R|kotlin/Any|>(): R|AbstractList<T>| {
|
||||
public constructor<T : R|kotlin/Any|>(): R|AbstractList<T>| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user