[NI] Store setValue with fresh type variables before substitution

This commit is contained in:
Mikhail Zarechenskiy
2017-08-14 13:52:54 +03:00
committed by Stanislav Erokhin
parent 55d1130dfc
commit e040a317cc
4 changed files with 50 additions and 0 deletions
@@ -0,0 +1,10 @@
import kotlin.reflect.KProperty
class MyMetadata<in T, R>(val default: R) {
operator fun getValue(thisRef: T, desc: KProperty<*>): R = TODO()
operator fun setValue(thisRef: T, desc: KProperty<*>, value: R) {}
}
interface Something
class MyReceiver
var MyReceiver.something: Something? by MyMetadata(default = null)
@@ -0,0 +1,26 @@
package
public var MyReceiver.something: Something?
public final class MyMetadata</*0*/ in T, /*1*/ R> {
public constructor MyMetadata</*0*/ in T, /*1*/ R>(/*0*/ default: R)
public final val default: R
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
public final operator fun getValue(/*0*/ thisRef: T, /*1*/ desc: kotlin.reflect.KProperty<*>): R
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
public final operator fun setValue(/*0*/ thisRef: T, /*1*/ desc: kotlin.reflect.KProperty<*>, /*2*/ value: R): kotlin.Unit
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
}
public final class MyReceiver {
public constructor MyReceiver()
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
}
public interface Something {
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
}