[FE 1.0] Don't throw exception during substitution of accessors, just return original
This commit is contained in:
committed by
teamcity
parent
db54d18c72
commit
00d1e46c5a
@@ -0,0 +1,67 @@
|
||||
FILE fqName:<root> fileName:/dontLeaveStubTypesInSetter.kt
|
||||
CLASS CLASS name:Foo modality:FINAL visibility:public superTypes:[kotlin.Any]
|
||||
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.Foo<T of <root>.Foo>
|
||||
TYPE_PARAMETER name:T index:0 variance: superTypes:[kotlin.Any?] reified:false
|
||||
CONSTRUCTOR visibility:public <> (x:T of <root>.Foo) returnType:<root>.Foo<T of <root>.Foo> [primary]
|
||||
VALUE_PARAMETER name:x index:0 type:T of <root>.Foo
|
||||
BLOCK_BODY
|
||||
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in kotlin.Any'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Foo modality:FINAL visibility:public superTypes:[kotlin.Any]'
|
||||
PROPERTY name:x visibility:public modality:FINAL [var]
|
||||
FIELD PROPERTY_BACKING_FIELD name:x type:T of <root>.Foo visibility:private
|
||||
EXPRESSION_BODY
|
||||
GET_VAR 'x: T of <root>.Foo declared in <root>.Foo.<init>' type=T of <root>.Foo origin=INITIALIZE_PROPERTY_FROM_PARAMETER
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-x> visibility:public modality:FINAL <> ($this:<root>.Foo<T of <root>.Foo>) returnType:T of <root>.Foo
|
||||
correspondingProperty: PROPERTY name:x visibility:public modality:FINAL [var]
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.Foo<T of <root>.Foo>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun <get-x> (): T of <root>.Foo declared in <root>.Foo'
|
||||
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:T of <root>.Foo visibility:private' type=T of <root>.Foo origin=null
|
||||
receiver: GET_VAR '<this>: <root>.Foo<T of <root>.Foo> declared in <root>.Foo.<get-x>' type=<root>.Foo<T of <root>.Foo> origin=null
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR name:<set-x> visibility:public modality:FINAL <> ($this:<root>.Foo<T of <root>.Foo>, <set-?>:T of <root>.Foo) returnType:kotlin.Unit
|
||||
correspondingProperty: PROPERTY name:x visibility:public modality:FINAL [var]
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.Foo<T of <root>.Foo>
|
||||
VALUE_PARAMETER name:<set-?> index:0 type:T of <root>.Foo
|
||||
BLOCK_BODY
|
||||
SET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:x type:T of <root>.Foo visibility:private' type=kotlin.Unit origin=null
|
||||
receiver: GET_VAR '<this>: <root>.Foo<T of <root>.Foo> declared in <root>.Foo.<set-x>' type=<root>.Foo<T of <root>.Foo> origin=null
|
||||
value: GET_VAR '<set-?>: T of <root>.Foo declared in <root>.Foo.<set-x>' type=T of <root>.Foo origin=null
|
||||
FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean [fake_override,operator]
|
||||
overridden:
|
||||
public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any
|
||||
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
|
||||
VALUE_PARAMETER name:other index:0 type:kotlin.Any?
|
||||
FUN FAKE_OVERRIDE name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int [fake_override]
|
||||
overridden:
|
||||
public open fun hashCode (): kotlin.Int declared in kotlin.Any
|
||||
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
|
||||
FUN FAKE_OVERRIDE name:toString visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.String [fake_override]
|
||||
overridden:
|
||||
public open fun toString (): kotlin.String declared in kotlin.Any
|
||||
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
|
||||
FUN name:foo visibility:public modality:FINAL <K> (x:kotlin.collections.MutableList<K of <root>.foo>) returnType:<root>.Foo<K of <root>.foo>
|
||||
TYPE_PARAMETER name:K index:0 variance: superTypes:[kotlin.Any?] reified:false
|
||||
VALUE_PARAMETER name:x index:0 type:kotlin.collections.MutableList<K of <root>.foo>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun foo <K> (x: kotlin.collections.MutableList<K of <root>.foo>): <root>.Foo<K of <root>.foo> declared in <root>'
|
||||
CALL 'public final fun TODO (): kotlin.Nothing [inline] declared in kotlin.StandardKt' type=kotlin.Nothing origin=null
|
||||
FUN name:main visibility:public modality:FINAL <> () returnType:kotlin.Unit
|
||||
BLOCK_BODY
|
||||
VAR name:x type:kotlin.collections.List<kotlin.String> [val]
|
||||
CALL 'public final fun buildList <E> (builderAction: @[ExtensionFunctionType] kotlin.Function1<kotlin.collections.MutableList<E of kotlin.collections.CollectionsKt.buildList>, kotlin.Unit>): kotlin.collections.List<E of kotlin.collections.CollectionsKt.buildList> [inline] declared in kotlin.collections.CollectionsKt' type=kotlin.collections.List<kotlin.String> origin=null
|
||||
<E>: kotlin.String
|
||||
builderAction: FUN_EXPR type=@[ExtensionFunctionType] kotlin.Function1<kotlin.collections.MutableList<kotlin.String>, kotlin.Unit> origin=LAMBDA
|
||||
FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> ($receiver:kotlin.collections.MutableList<kotlin.String>) returnType:kotlin.Unit
|
||||
$receiver: VALUE_PARAMETER name:$this$buildList type:kotlin.collections.MutableList<kotlin.String>
|
||||
BLOCK_BODY
|
||||
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
|
||||
CALL 'public abstract fun add (element: E of kotlin.collections.MutableList): kotlin.Boolean declared in kotlin.collections.MutableList' type=kotlin.Boolean origin=null
|
||||
$this: GET_VAR '$this$buildList: kotlin.collections.MutableList<kotlin.String> declared in <root>.main.<anonymous>' type=kotlin.collections.MutableList<kotlin.String> origin=null
|
||||
element: CONST String type=kotlin.String value=""
|
||||
VAR name:foo type:<root>.Foo<kotlin.String> [val]
|
||||
CALL 'public final fun foo <K> (x: kotlin.collections.MutableList<K of <root>.foo>): <root>.Foo<K of <root>.foo> declared in <root>' type=<root>.Foo<kotlin.String> origin=null
|
||||
<K>: kotlin.String
|
||||
x: GET_VAR '$this$buildList: kotlin.collections.MutableList<kotlin.String> declared in <root>.main.<anonymous>' type=kotlin.collections.MutableList<kotlin.String> origin=null
|
||||
CALL 'public final fun <set-x> (<set-?>: T of <root>.Foo): kotlin.Unit declared in <root>.Foo' type=kotlin.Unit origin=EQ
|
||||
$this: GET_VAR 'val foo: <root>.Foo<kotlin.String> [val] declared in <root>.main.<anonymous>' type=<root>.Foo<kotlin.String> origin=null
|
||||
<set-?>: CONST String type=kotlin.String value=""
|
||||
@@ -0,0 +1,14 @@
|
||||
// FIR_IDENTICAL
|
||||
// WITH_STDLIB
|
||||
|
||||
class Foo<T>(var x: T)
|
||||
|
||||
fun <K> foo(x: MutableList<K>): Foo<K> = TODO()
|
||||
|
||||
fun main() {
|
||||
val x = buildList {
|
||||
add("")
|
||||
val foo = foo(this)
|
||||
foo.x = ""
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
class Foo<T : Any?> {
|
||||
constructor(x: T) /* primary */ {
|
||||
super/*Any*/()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
var x: T
|
||||
field = x
|
||||
get
|
||||
set
|
||||
|
||||
}
|
||||
|
||||
fun <K : Any?> foo(x: MutableList<K>): Foo<K> {
|
||||
return TODO()
|
||||
}
|
||||
|
||||
fun main() {
|
||||
val x: List<String> = buildList<String>(builderAction = local fun MutableList<String>.<anonymous>() {
|
||||
$this$buildList.add(element = "") /*~> Unit */
|
||||
val foo: Foo<String> = foo<String>(x = $this$buildList)
|
||||
foo.<set-x>(<set-?> = "")
|
||||
}
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user