Add test for KT-42036
This commit is contained in:
committed by
Victor Petukhov
parent
30a5eee481
commit
826985450e
+5
@@ -2246,6 +2246,11 @@ public class Fir2IrTextTestGenerated extends AbstractFir2IrTextTest {
|
|||||||
runTest("compiler/testData/ir/irText/types/starProjection_OI.kt");
|
runTest("compiler/testData/ir/irText/types/starProjection_OI.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("typeAliasWithUnsafeVariance.kt")
|
||||||
|
public void testTypeAliasWithUnsafeVariance() throws Exception {
|
||||||
|
runTest("compiler/testData/ir/irText/types/typeAliasWithUnsafeVariance.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("compiler/testData/ir/irText/types/nullChecks")
|
@TestMetadata("compiler/testData/ir/irText/types/nullChecks")
|
||||||
@TestDataPath("$PROJECT_ROOT")
|
@TestDataPath("$PROJECT_ROOT")
|
||||||
@RunWith(JUnit3RunnerWithInners.class)
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
|
|||||||
@@ -0,0 +1,51 @@
|
|||||||
|
typealias Action<RenderingT : Any?> = Function1<RenderingT, Unit>
|
||||||
|
data class Tag<out RenderingT : Any?> {
|
||||||
|
constructor(action: Function1<RenderingT, Unit>) /* primary */ {
|
||||||
|
super/*Any*/()
|
||||||
|
/* <init>() */
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
val action: Function1<RenderingT, Unit>
|
||||||
|
field = action
|
||||||
|
get
|
||||||
|
|
||||||
|
fun component1(): Function1<RenderingT, Unit> {
|
||||||
|
return <this>.#action
|
||||||
|
}
|
||||||
|
|
||||||
|
fun copy(action: Function1<RenderingT, Unit> = <this>.#action): Tag<RenderingT> {
|
||||||
|
return Tag<Any>(action = action)
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun equals(other: Any?): Boolean {
|
||||||
|
when {
|
||||||
|
EQEQEQ(arg0 = <this>, arg1 = other) -> return true
|
||||||
|
}
|
||||||
|
when {
|
||||||
|
other !is Tag<RenderingT> -> return false
|
||||||
|
}
|
||||||
|
val tmp0_other_with_cast: Tag<RenderingT> = other as Tag<RenderingT>
|
||||||
|
when {
|
||||||
|
EQEQ(arg0 = <this>.#action, arg1 = tmp0_other_with_cast.#action).not() -> return false
|
||||||
|
}
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun hashCode(): Int {
|
||||||
|
return <this>.#action.hashCode()
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun toString(): String {
|
||||||
|
return "Tag(" + "action=" + <this>.#action + ")"
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
fun getTag(): Tag<*> {
|
||||||
|
return throw Exception()
|
||||||
|
}
|
||||||
|
|
||||||
|
fun doAction() {
|
||||||
|
getTag().<get-action>() /*~> Unit */
|
||||||
|
}
|
||||||
@@ -0,0 +1,104 @@
|
|||||||
|
FILE fqName:<root> fileName:/typeAliasWithUnsafeVariance.kt
|
||||||
|
TYPEALIAS name:Action visibility:public expandedType:kotlin.Function1<RenderingT of <root>.Action, kotlin.Unit>
|
||||||
|
TYPE_PARAMETER name:RenderingT index:0 variance: superTypes:[kotlin.Any?]
|
||||||
|
CLASS CLASS name:Tag modality:FINAL visibility:public [data] superTypes:[kotlin.Any]
|
||||||
|
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.Tag<RenderingT of <root>.Tag>
|
||||||
|
TYPE_PARAMETER name:RenderingT index:0 variance:out superTypes:[kotlin.Any?]
|
||||||
|
CONSTRUCTOR visibility:public <> (action:kotlin.Function1<RenderingT of <root>.Tag, kotlin.Unit>) returnType:<root>.Tag<RenderingT of <root>.Tag> [primary]
|
||||||
|
VALUE_PARAMETER name:action index:0 type:kotlin.Function1<RenderingT of <root>.Tag, kotlin.Unit>
|
||||||
|
BLOCK_BODY
|
||||||
|
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in kotlin.Any'
|
||||||
|
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Tag modality:FINAL visibility:public [data] superTypes:[kotlin.Any]'
|
||||||
|
PROPERTY name:action visibility:public modality:FINAL [val]
|
||||||
|
FIELD PROPERTY_BACKING_FIELD name:action type:kotlin.Function1<RenderingT of <root>.Tag, kotlin.Unit> visibility:private [final]
|
||||||
|
EXPRESSION_BODY
|
||||||
|
GET_VAR 'action: kotlin.Function1<RenderingT of <root>.Tag, kotlin.Unit> declared in <root>.Tag.<init>' type=kotlin.Function1<RenderingT of <root>.Tag, kotlin.Unit> origin=INITIALIZE_PROPERTY_FROM_PARAMETER
|
||||||
|
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-action> visibility:public modality:FINAL <> ($this:<root>.Tag<RenderingT of <root>.Tag>) returnType:kotlin.Function1<RenderingT of <root>.Tag, kotlin.Unit>
|
||||||
|
correspondingProperty: PROPERTY name:action visibility:public modality:FINAL [val]
|
||||||
|
$this: VALUE_PARAMETER name:<this> type:<root>.Tag<RenderingT of <root>.Tag>
|
||||||
|
BLOCK_BODY
|
||||||
|
RETURN type=kotlin.Nothing from='public final fun <get-action> (): kotlin.Function1<RenderingT of <root>.Tag, kotlin.Unit> declared in <root>.Tag'
|
||||||
|
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:action type:kotlin.Function1<RenderingT of <root>.Tag, kotlin.Unit> visibility:private [final]' type=kotlin.Function1<RenderingT of <root>.Tag, kotlin.Unit> origin=null
|
||||||
|
receiver: GET_VAR '<this>: <root>.Tag<RenderingT of <root>.Tag> declared in <root>.Tag.<get-action>' type=<root>.Tag<RenderingT of <root>.Tag> origin=null
|
||||||
|
FUN name:component1 visibility:public modality:FINAL <> ($this:<root>.Tag<RenderingT of <root>.Tag>) returnType:kotlin.Function1<RenderingT of <root>.Tag, kotlin.Unit>
|
||||||
|
$this: VALUE_PARAMETER name:<this> type:<root>.Tag<RenderingT of <root>.Tag>
|
||||||
|
BLOCK_BODY
|
||||||
|
RETURN type=kotlin.Nothing from='public final fun component1 (): kotlin.Function1<RenderingT of <root>.Tag, kotlin.Unit> declared in <root>.Tag'
|
||||||
|
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:action type:kotlin.Function1<RenderingT of <root>.Tag, kotlin.Unit> visibility:private [final]' type=kotlin.Function1<RenderingT of <root>.Tag, kotlin.Unit> origin=null
|
||||||
|
receiver: GET_VAR '<this>: <root>.Tag<RenderingT of <root>.Tag> declared in <root>.Tag.component1' type=<root>.Tag<RenderingT of <root>.Tag> origin=null
|
||||||
|
FUN name:copy visibility:public modality:FINAL <> ($this:<root>.Tag<RenderingT of <root>.Tag>, action:kotlin.Function1<RenderingT of <root>.Tag, kotlin.Unit>) returnType:<root>.Tag<RenderingT of <root>.Tag>
|
||||||
|
$this: VALUE_PARAMETER name:<this> type:<root>.Tag<RenderingT of <root>.Tag>
|
||||||
|
VALUE_PARAMETER name:action index:0 type:kotlin.Function1<RenderingT of <root>.Tag, kotlin.Unit>
|
||||||
|
EXPRESSION_BODY
|
||||||
|
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:action type:kotlin.Function1<RenderingT of <root>.Tag, kotlin.Unit> visibility:private [final]' type=kotlin.Function1<RenderingT of <root>.Tag, kotlin.Unit> origin=null
|
||||||
|
receiver: GET_VAR '<this>: <root>.Tag<RenderingT of <root>.Tag> declared in <root>.Tag.copy' type=<root>.Tag<RenderingT of <root>.Tag> origin=null
|
||||||
|
BLOCK_BODY
|
||||||
|
RETURN type=kotlin.Nothing from='public final fun copy (action: kotlin.Function1<RenderingT of <root>.Tag, kotlin.Unit>): <root>.Tag<RenderingT of <root>.Tag> declared in <root>.Tag'
|
||||||
|
CONSTRUCTOR_CALL 'public constructor <init> (action: kotlin.Function1<RenderingT of <root>.Tag, kotlin.Unit>) [primary] declared in <root>.Tag' type=<root>.Tag<RenderingT of <root>.Tag> origin=null
|
||||||
|
<class: RenderingT>: kotlin.Any
|
||||||
|
action: GET_VAR 'action: kotlin.Function1<RenderingT of <root>.Tag, kotlin.Unit> declared in <root>.Tag.copy' type=kotlin.Function1<RenderingT of <root>.Tag, kotlin.Unit> origin=null
|
||||||
|
FUN GENERATED_DATA_CLASS_MEMBER name:equals visibility:public modality:OPEN <> ($this:<root>.Tag<RenderingT of <root>.Tag>, other:kotlin.Any?) returnType:kotlin.Boolean
|
||||||
|
overridden:
|
||||||
|
public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any
|
||||||
|
$this: VALUE_PARAMETER GENERATED_DATA_CLASS_MEMBER name:<this> type:<root>.Tag<RenderingT of <root>.Tag>
|
||||||
|
VALUE_PARAMETER GENERATED_DATA_CLASS_MEMBER name:other index:0 type:kotlin.Any?
|
||||||
|
BLOCK_BODY
|
||||||
|
WHEN type=kotlin.Unit origin=null
|
||||||
|
BRANCH
|
||||||
|
if: CALL 'public final fun EQEQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQEQ
|
||||||
|
arg0: GET_VAR '<this>: <root>.Tag<RenderingT of <root>.Tag> declared in <root>.Tag.equals' type=<root>.Tag<RenderingT of <root>.Tag> origin=null
|
||||||
|
arg1: GET_VAR 'other: kotlin.Any? declared in <root>.Tag.equals' type=kotlin.Any? origin=null
|
||||||
|
then: RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in <root>.Tag'
|
||||||
|
CONST Boolean type=kotlin.Boolean value=true
|
||||||
|
WHEN type=kotlin.Unit origin=null
|
||||||
|
BRANCH
|
||||||
|
if: TYPE_OP type=kotlin.Boolean origin=NOT_INSTANCEOF typeOperand=<root>.Tag<RenderingT of <root>.Tag>
|
||||||
|
GET_VAR 'other: kotlin.Any? declared in <root>.Tag.equals' type=kotlin.Any? origin=null
|
||||||
|
then: RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in <root>.Tag'
|
||||||
|
CONST Boolean type=kotlin.Boolean value=false
|
||||||
|
VAR IR_TEMPORARY_VARIABLE name:tmp_0 type:<root>.Tag<RenderingT of <root>.Tag> [val]
|
||||||
|
TYPE_OP type=<root>.Tag<RenderingT of <root>.Tag> origin=CAST typeOperand=<root>.Tag<RenderingT of <root>.Tag>
|
||||||
|
GET_VAR 'other: kotlin.Any? declared in <root>.Tag.equals' type=kotlin.Any? origin=null
|
||||||
|
WHEN type=kotlin.Unit origin=null
|
||||||
|
BRANCH
|
||||||
|
if: CALL 'public final fun not (): kotlin.Boolean [operator] declared in kotlin.Boolean' type=kotlin.Boolean origin=EXCLEQ
|
||||||
|
$this: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EXCLEQ
|
||||||
|
arg0: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:action type:kotlin.Function1<RenderingT of <root>.Tag, kotlin.Unit> visibility:private [final]' type=kotlin.Function1<RenderingT of <root>.Tag, kotlin.Unit> origin=null
|
||||||
|
receiver: GET_VAR '<this>: <root>.Tag<RenderingT of <root>.Tag> declared in <root>.Tag.equals' type=<root>.Tag<RenderingT of <root>.Tag> origin=null
|
||||||
|
arg1: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:action type:kotlin.Function1<RenderingT of <root>.Tag, kotlin.Unit> visibility:private [final]' type=kotlin.Function1<RenderingT of <root>.Tag, kotlin.Unit> origin=null
|
||||||
|
receiver: GET_VAR 'val tmp_0: <root>.Tag<RenderingT of <root>.Tag> [val] declared in <root>.Tag.equals' type=<root>.Tag<RenderingT of <root>.Tag> origin=null
|
||||||
|
then: RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in <root>.Tag'
|
||||||
|
CONST Boolean type=kotlin.Boolean value=false
|
||||||
|
RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean declared in <root>.Tag'
|
||||||
|
CONST Boolean type=kotlin.Boolean value=true
|
||||||
|
FUN GENERATED_DATA_CLASS_MEMBER name:hashCode visibility:public modality:OPEN <> ($this:<root>.Tag<RenderingT of <root>.Tag>) returnType:kotlin.Int
|
||||||
|
overridden:
|
||||||
|
public open fun hashCode (): kotlin.Int declared in kotlin.Any
|
||||||
|
$this: VALUE_PARAMETER GENERATED_DATA_CLASS_MEMBER name:<this> type:<root>.Tag<RenderingT of <root>.Tag>
|
||||||
|
BLOCK_BODY
|
||||||
|
RETURN type=kotlin.Nothing from='public open fun hashCode (): kotlin.Int declared in <root>.Tag'
|
||||||
|
CALL 'public open fun hashCode (): kotlin.Int [fake_override] declared in kotlin.Function1' type=kotlin.Int origin=null
|
||||||
|
$this: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:action type:kotlin.Function1<RenderingT of <root>.Tag, kotlin.Unit> visibility:private [final]' type=kotlin.Function1<RenderingT of <root>.Tag, kotlin.Unit> origin=null
|
||||||
|
receiver: GET_VAR '<this>: <root>.Tag<RenderingT of <root>.Tag> declared in <root>.Tag.hashCode' type=<root>.Tag<RenderingT of <root>.Tag> origin=null
|
||||||
|
FUN GENERATED_DATA_CLASS_MEMBER name:toString visibility:public modality:OPEN <> ($this:<root>.Tag<RenderingT of <root>.Tag>) returnType:kotlin.String
|
||||||
|
overridden:
|
||||||
|
public open fun toString (): kotlin.String declared in kotlin.Any
|
||||||
|
$this: VALUE_PARAMETER GENERATED_DATA_CLASS_MEMBER name:<this> type:<root>.Tag<RenderingT of <root>.Tag>
|
||||||
|
BLOCK_BODY
|
||||||
|
RETURN type=kotlin.Nothing from='public open fun toString (): kotlin.String declared in <root>.Tag'
|
||||||
|
STRING_CONCATENATION type=kotlin.String
|
||||||
|
CONST String type=kotlin.String value="Tag("
|
||||||
|
CONST String type=kotlin.String value="action="
|
||||||
|
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:action type:kotlin.Function1<RenderingT of <root>.Tag, kotlin.Unit> visibility:private [final]' type=kotlin.Function1<RenderingT of <root>.Tag, kotlin.Unit> origin=null
|
||||||
|
receiver: GET_VAR '<this>: <root>.Tag<RenderingT of <root>.Tag> declared in <root>.Tag.toString' type=<root>.Tag<RenderingT of <root>.Tag> origin=null
|
||||||
|
CONST String type=kotlin.String value=")"
|
||||||
|
FUN name:getTag visibility:public modality:FINAL <> () returnType:<root>.Tag<*>
|
||||||
|
BLOCK_BODY
|
||||||
|
RETURN type=kotlin.Nothing from='public final fun getTag (): <root>.Tag<*> declared in <root>'
|
||||||
|
THROW type=kotlin.Nothing
|
||||||
|
CONSTRUCTOR_CALL 'public constructor <init> () declared in java.lang.Exception' type=java.lang.Exception origin=null
|
||||||
|
FUN name:doAction visibility:public modality:FINAL <> () returnType:kotlin.Unit
|
||||||
|
BLOCK_BODY
|
||||||
|
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
|
||||||
|
CALL 'public final fun <get-action> (): kotlin.Function1<RenderingT of <root>.Tag, kotlin.Unit> declared in <root>.Tag' type=kotlin.Function1<kotlin.Nothing, kotlin.Unit> origin=GET_PROPERTY
|
||||||
|
$this: CALL 'public final fun getTag (): <root>.Tag<*> declared in <root>' type=<root>.Tag<*> origin=null
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
// !LANGUAGE: +NewInference
|
||||||
|
|
||||||
|
// KT-42036
|
||||||
|
|
||||||
|
typealias Action<RenderingT> = (@UnsafeVariance RenderingT) -> Unit
|
||||||
|
// When a typealias is used, the compiler crashes.
|
||||||
|
data class Tag<out RenderingT>(val action: Action<RenderingT>)
|
||||||
|
// When no typealias is used, the compiler is fine.
|
||||||
|
//data class Tag<out RenderingT>(val action: (@UnsafeVariance RenderingT) -> Unit)
|
||||||
|
fun getTag(): Tag<*> = throw Exception()
|
||||||
|
fun doAction() {
|
||||||
|
// This line crashes the compiler.
|
||||||
|
getTag().action
|
||||||
|
}
|
||||||
@@ -0,0 +1,51 @@
|
|||||||
|
typealias Action<RenderingT : Any?> = Function1<@UnsafeVariance RenderingT, Unit>
|
||||||
|
data class Tag<out RenderingT : Any?> {
|
||||||
|
constructor(action: Function1<@UnsafeVariance RenderingT, Unit>) /* primary */ {
|
||||||
|
super/*Any*/()
|
||||||
|
/* <init>() */
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
val action: Function1<@UnsafeVariance RenderingT, Unit>
|
||||||
|
field = action
|
||||||
|
get
|
||||||
|
|
||||||
|
operator fun component1(): Function1<@UnsafeVariance RenderingT, Unit> {
|
||||||
|
return <this>.#action
|
||||||
|
}
|
||||||
|
|
||||||
|
fun copy(action: Function1<@UnsafeVariance RenderingT, Unit> = <this>.#action): Tag<RenderingT> {
|
||||||
|
return Tag<RenderingT>(action = action)
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun toString(): String {
|
||||||
|
return "Tag(" + "action=" + <this>.#action + ")"
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun hashCode(): Int {
|
||||||
|
return <this>.#action.hashCode()
|
||||||
|
}
|
||||||
|
|
||||||
|
override operator fun equals(other: Any?): Boolean {
|
||||||
|
when {
|
||||||
|
EQEQEQ(arg0 = <this>, arg1 = other) -> return true
|
||||||
|
}
|
||||||
|
when {
|
||||||
|
other !is Tag<RenderingT> -> return false
|
||||||
|
}
|
||||||
|
val tmp0_other_with_cast: Tag<RenderingT> = other as Tag<RenderingT>
|
||||||
|
when {
|
||||||
|
EQEQ(arg0 = <this>.#action, arg1 = tmp0_other_with_cast.#action).not() -> return false
|
||||||
|
}
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
fun getTag(): Tag<*> {
|
||||||
|
throw Exception()
|
||||||
|
}
|
||||||
|
|
||||||
|
fun doAction() {
|
||||||
|
getTag().<get-action>() /*~> Unit */
|
||||||
|
}
|
||||||
@@ -0,0 +1,103 @@
|
|||||||
|
FILE fqName:<root> fileName:/typeAliasWithUnsafeVariance.kt
|
||||||
|
TYPEALIAS name:Action visibility:public expandedType:kotlin.Function1<@[UnsafeVariance] RenderingT of <root>.Action, kotlin.Unit>
|
||||||
|
TYPE_PARAMETER name:RenderingT index:0 variance: superTypes:[kotlin.Any?]
|
||||||
|
CLASS CLASS name:Tag modality:FINAL visibility:public [data] superTypes:[kotlin.Any]
|
||||||
|
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.Tag<RenderingT of <root>.Tag>
|
||||||
|
TYPE_PARAMETER name:RenderingT index:0 variance:out superTypes:[kotlin.Any?]
|
||||||
|
CONSTRUCTOR visibility:public <> (action:kotlin.Function1<@[UnsafeVariance] RenderingT of <root>.Tag, kotlin.Unit>{ <root>.Action<RenderingT of <root>.Tag> }) returnType:<root>.Tag<RenderingT of <root>.Tag> [primary]
|
||||||
|
VALUE_PARAMETER name:action index:0 type:kotlin.Function1<@[UnsafeVariance] RenderingT of <root>.Tag, kotlin.Unit>{ <root>.Action<RenderingT of <root>.Tag> }
|
||||||
|
BLOCK_BODY
|
||||||
|
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in kotlin.Any'
|
||||||
|
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Tag modality:FINAL visibility:public [data] superTypes:[kotlin.Any]'
|
||||||
|
PROPERTY name:action visibility:public modality:FINAL [val]
|
||||||
|
FIELD PROPERTY_BACKING_FIELD name:action type:kotlin.Function1<@[UnsafeVariance] RenderingT of <root>.Tag, kotlin.Unit>{ <root>.Action<RenderingT of <root>.Tag> } visibility:private [final]
|
||||||
|
EXPRESSION_BODY
|
||||||
|
GET_VAR 'action: kotlin.Function1<@[UnsafeVariance] RenderingT of <root>.Tag, kotlin.Unit>{ <root>.Action<RenderingT of <root>.Tag> } declared in <root>.Tag.<init>' type=kotlin.Function1<@[UnsafeVariance] RenderingT of <root>.Tag, kotlin.Unit>{ <root>.Action<RenderingT of <root>.Tag> } origin=INITIALIZE_PROPERTY_FROM_PARAMETER
|
||||||
|
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-action> visibility:public modality:FINAL <> ($this:<root>.Tag<RenderingT of <root>.Tag>) returnType:kotlin.Function1<@[UnsafeVariance] RenderingT of <root>.Tag, kotlin.Unit>{ <root>.Action<RenderingT of <root>.Tag> }
|
||||||
|
correspondingProperty: PROPERTY name:action visibility:public modality:FINAL [val]
|
||||||
|
$this: VALUE_PARAMETER name:<this> type:<root>.Tag<RenderingT of <root>.Tag>
|
||||||
|
BLOCK_BODY
|
||||||
|
RETURN type=kotlin.Nothing from='public final fun <get-action> (): kotlin.Function1<@[UnsafeVariance] RenderingT of <root>.Tag, kotlin.Unit>{ <root>.Action<RenderingT of <root>.Tag> } declared in <root>.Tag'
|
||||||
|
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:action type:kotlin.Function1<@[UnsafeVariance] RenderingT of <root>.Tag, kotlin.Unit>{ <root>.Action<RenderingT of <root>.Tag> } visibility:private [final]' type=kotlin.Function1<@[UnsafeVariance] RenderingT of <root>.Tag, kotlin.Unit>{ <root>.Action<RenderingT of <root>.Tag> } origin=null
|
||||||
|
receiver: GET_VAR '<this>: <root>.Tag<RenderingT of <root>.Tag> declared in <root>.Tag.<get-action>' type=<root>.Tag<RenderingT of <root>.Tag> origin=null
|
||||||
|
FUN GENERATED_DATA_CLASS_MEMBER name:component1 visibility:public modality:FINAL <> ($this:<root>.Tag<RenderingT of <root>.Tag>) returnType:kotlin.Function1<@[UnsafeVariance] RenderingT of <root>.Tag, kotlin.Unit>{ <root>.Action<RenderingT of <root>.Tag> } [operator]
|
||||||
|
$this: VALUE_PARAMETER name:<this> type:<root>.Tag<RenderingT of <root>.Tag>
|
||||||
|
BLOCK_BODY
|
||||||
|
RETURN type=kotlin.Nothing from='public final fun component1 (): kotlin.Function1<@[UnsafeVariance] RenderingT of <root>.Tag, kotlin.Unit>{ <root>.Action<RenderingT of <root>.Tag> } [operator] declared in <root>.Tag'
|
||||||
|
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:action type:kotlin.Function1<@[UnsafeVariance] RenderingT of <root>.Tag, kotlin.Unit>{ <root>.Action<RenderingT of <root>.Tag> } visibility:private [final]' type=kotlin.Function1<@[UnsafeVariance] RenderingT of <root>.Tag, kotlin.Unit>{ <root>.Action<RenderingT of <root>.Tag> } origin=null
|
||||||
|
receiver: GET_VAR '<this>: <root>.Tag<RenderingT of <root>.Tag> declared in <root>.Tag.component1' type=<root>.Tag<RenderingT of <root>.Tag> origin=null
|
||||||
|
FUN GENERATED_DATA_CLASS_MEMBER name:copy visibility:public modality:FINAL <> ($this:<root>.Tag<RenderingT of <root>.Tag>, action:kotlin.Function1<@[UnsafeVariance] RenderingT of <root>.Tag, kotlin.Unit>{ <root>.Action<RenderingT of <root>.Tag> }) returnType:<root>.Tag<RenderingT of <root>.Tag>
|
||||||
|
$this: VALUE_PARAMETER name:<this> type:<root>.Tag<RenderingT of <root>.Tag>
|
||||||
|
VALUE_PARAMETER name:action index:0 type:kotlin.Function1<@[UnsafeVariance] RenderingT of <root>.Tag, kotlin.Unit>{ <root>.Action<RenderingT of <root>.Tag> }
|
||||||
|
EXPRESSION_BODY
|
||||||
|
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:action type:kotlin.Function1<@[UnsafeVariance] RenderingT of <root>.Tag, kotlin.Unit>{ <root>.Action<RenderingT of <root>.Tag> } visibility:private [final]' type=kotlin.Function1<@[UnsafeVariance] RenderingT of <root>.Tag, kotlin.Unit>{ <root>.Action<RenderingT of <root>.Tag> } origin=null
|
||||||
|
receiver: GET_VAR '<this>: <root>.Tag<RenderingT of <root>.Tag> declared in <root>.Tag.copy' type=<root>.Tag<RenderingT of <root>.Tag> origin=null
|
||||||
|
BLOCK_BODY
|
||||||
|
RETURN type=kotlin.Nothing from='public final fun copy (action: kotlin.Function1<@[UnsafeVariance] RenderingT of <root>.Tag, kotlin.Unit>{ <root>.Action<RenderingT of <root>.Tag> }): <root>.Tag<RenderingT of <root>.Tag> declared in <root>.Tag'
|
||||||
|
CONSTRUCTOR_CALL 'public constructor <init> (action: kotlin.Function1<@[UnsafeVariance] RenderingT of <root>.Tag, kotlin.Unit>{ <root>.Action<RenderingT of <root>.Tag> }) [primary] declared in <root>.Tag' type=<root>.Tag<RenderingT of <root>.Tag> origin=null
|
||||||
|
<class: RenderingT>: RenderingT of <root>.Tag
|
||||||
|
action: GET_VAR 'action: kotlin.Function1<@[UnsafeVariance] RenderingT of <root>.Tag, kotlin.Unit>{ <root>.Action<RenderingT of <root>.Tag> } declared in <root>.Tag.copy' type=kotlin.Function1<@[UnsafeVariance] RenderingT of <root>.Tag, kotlin.Unit>{ <root>.Action<RenderingT of <root>.Tag> } origin=null
|
||||||
|
FUN GENERATED_DATA_CLASS_MEMBER name:toString visibility:public modality:OPEN <> ($this:<root>.Tag<RenderingT of <root>.Tag>) returnType:kotlin.String
|
||||||
|
overridden:
|
||||||
|
public open fun toString (): kotlin.String declared in kotlin.Any
|
||||||
|
$this: VALUE_PARAMETER name:<this> type:<root>.Tag<RenderingT of <root>.Tag>
|
||||||
|
BLOCK_BODY
|
||||||
|
RETURN type=kotlin.Nothing from='public open fun toString (): kotlin.String declared in <root>.Tag'
|
||||||
|
STRING_CONCATENATION type=kotlin.String
|
||||||
|
CONST String type=kotlin.String value="Tag("
|
||||||
|
CONST String type=kotlin.String value="action="
|
||||||
|
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:action type:kotlin.Function1<@[UnsafeVariance] RenderingT of <root>.Tag, kotlin.Unit>{ <root>.Action<RenderingT of <root>.Tag> } visibility:private [final]' type=kotlin.Function1<@[UnsafeVariance] RenderingT of <root>.Tag, kotlin.Unit>{ <root>.Action<RenderingT of <root>.Tag> } origin=null
|
||||||
|
receiver: GET_VAR '<this>: <root>.Tag<RenderingT of <root>.Tag> declared in <root>.Tag.toString' type=<root>.Tag<RenderingT of <root>.Tag> origin=null
|
||||||
|
CONST String type=kotlin.String value=")"
|
||||||
|
FUN GENERATED_DATA_CLASS_MEMBER name:hashCode visibility:public modality:OPEN <> ($this:<root>.Tag<RenderingT of <root>.Tag>) returnType:kotlin.Int
|
||||||
|
overridden:
|
||||||
|
public open fun hashCode (): kotlin.Int declared in kotlin.Any
|
||||||
|
$this: VALUE_PARAMETER name:<this> type:<root>.Tag<RenderingT of <root>.Tag>
|
||||||
|
BLOCK_BODY
|
||||||
|
RETURN type=kotlin.Nothing from='public open fun hashCode (): kotlin.Int declared in <root>.Tag'
|
||||||
|
CALL 'public open fun hashCode (): kotlin.Int [fake_override] declared in kotlin.Function1' type=kotlin.Int origin=null
|
||||||
|
$this: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:action type:kotlin.Function1<@[UnsafeVariance] RenderingT of <root>.Tag, kotlin.Unit>{ <root>.Action<RenderingT of <root>.Tag> } visibility:private [final]' type=kotlin.Function1<@[UnsafeVariance] RenderingT of <root>.Tag, kotlin.Unit>{ <root>.Action<RenderingT of <root>.Tag> } origin=null
|
||||||
|
receiver: GET_VAR '<this>: <root>.Tag<RenderingT of <root>.Tag> declared in <root>.Tag.hashCode' type=<root>.Tag<RenderingT of <root>.Tag> origin=null
|
||||||
|
FUN GENERATED_DATA_CLASS_MEMBER name:equals visibility:public modality:OPEN <> ($this:<root>.Tag<RenderingT of <root>.Tag>, other:kotlin.Any?) returnType:kotlin.Boolean [operator]
|
||||||
|
overridden:
|
||||||
|
public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in kotlin.Any
|
||||||
|
$this: VALUE_PARAMETER name:<this> type:<root>.Tag<RenderingT of <root>.Tag>
|
||||||
|
VALUE_PARAMETER name:other index:0 type:kotlin.Any?
|
||||||
|
BLOCK_BODY
|
||||||
|
WHEN type=kotlin.Unit origin=null
|
||||||
|
BRANCH
|
||||||
|
if: CALL 'public final fun EQEQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQEQ
|
||||||
|
arg0: GET_VAR '<this>: <root>.Tag<RenderingT of <root>.Tag> declared in <root>.Tag.equals' type=<root>.Tag<RenderingT of <root>.Tag> origin=null
|
||||||
|
arg1: GET_VAR 'other: kotlin.Any? declared in <root>.Tag.equals' type=kotlin.Any? origin=null
|
||||||
|
then: RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in <root>.Tag'
|
||||||
|
CONST Boolean type=kotlin.Boolean value=true
|
||||||
|
WHEN type=kotlin.Unit origin=null
|
||||||
|
BRANCH
|
||||||
|
if: TYPE_OP type=kotlin.Boolean origin=NOT_INSTANCEOF typeOperand=<root>.Tag<RenderingT of <root>.Tag>
|
||||||
|
GET_VAR 'other: kotlin.Any? declared in <root>.Tag.equals' type=kotlin.Any? origin=null
|
||||||
|
then: RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in <root>.Tag'
|
||||||
|
CONST Boolean type=kotlin.Boolean value=false
|
||||||
|
VAR IR_TEMPORARY_VARIABLE name:tmp_0 type:<root>.Tag<RenderingT of <root>.Tag> [val]
|
||||||
|
TYPE_OP type=<root>.Tag<RenderingT of <root>.Tag> origin=CAST typeOperand=<root>.Tag<RenderingT of <root>.Tag>
|
||||||
|
GET_VAR 'other: kotlin.Any? declared in <root>.Tag.equals' type=kotlin.Any? origin=null
|
||||||
|
WHEN type=kotlin.Unit origin=null
|
||||||
|
BRANCH
|
||||||
|
if: CALL 'public final fun not (): kotlin.Boolean [operator] declared in kotlin.Boolean' type=kotlin.Boolean origin=EXCLEQ
|
||||||
|
$this: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EXCLEQ
|
||||||
|
arg0: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:action type:kotlin.Function1<@[UnsafeVariance] RenderingT of <root>.Tag, kotlin.Unit>{ <root>.Action<RenderingT of <root>.Tag> } visibility:private [final]' type=kotlin.Function1<@[UnsafeVariance] RenderingT of <root>.Tag, kotlin.Unit>{ <root>.Action<RenderingT of <root>.Tag> } origin=null
|
||||||
|
receiver: GET_VAR '<this>: <root>.Tag<RenderingT of <root>.Tag> declared in <root>.Tag.equals' type=<root>.Tag<RenderingT of <root>.Tag> origin=null
|
||||||
|
arg1: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:action type:kotlin.Function1<@[UnsafeVariance] RenderingT of <root>.Tag, kotlin.Unit>{ <root>.Action<RenderingT of <root>.Tag> } visibility:private [final]' type=kotlin.Function1<@[UnsafeVariance] RenderingT of <root>.Tag, kotlin.Unit>{ <root>.Action<RenderingT of <root>.Tag> } origin=null
|
||||||
|
receiver: GET_VAR 'val tmp_0: <root>.Tag<RenderingT of <root>.Tag> [val] declared in <root>.Tag.equals' type=<root>.Tag<RenderingT of <root>.Tag> origin=null
|
||||||
|
then: RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in <root>.Tag'
|
||||||
|
CONST Boolean type=kotlin.Boolean value=false
|
||||||
|
RETURN type=kotlin.Nothing from='public open fun equals (other: kotlin.Any?): kotlin.Boolean [operator] declared in <root>.Tag'
|
||||||
|
CONST Boolean type=kotlin.Boolean value=true
|
||||||
|
FUN name:getTag visibility:public modality:FINAL <> () returnType:<root>.Tag<*>
|
||||||
|
BLOCK_BODY
|
||||||
|
THROW type=kotlin.Nothing
|
||||||
|
CONSTRUCTOR_CALL 'public constructor <init> () declared in java.lang.Exception' type=java.lang.Exception origin=null
|
||||||
|
FUN name:doAction visibility:public modality:FINAL <> () returnType:kotlin.Unit
|
||||||
|
BLOCK_BODY
|
||||||
|
TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit
|
||||||
|
CALL 'public final fun <get-action> (): kotlin.Function1<@[UnsafeVariance] RenderingT of <root>.Tag, kotlin.Unit>{ <root>.Action<RenderingT of <root>.Tag> } declared in <root>.Tag' type=kotlin.Function1<kotlin.Any?, kotlin.Unit>{ <root>.Action<kotlin.Any?> } origin=GET_PROPERTY
|
||||||
|
$this: CALL 'public final fun getTag (): <root>.Tag<*> declared in <root>' type=<root>.Tag<*> origin=null
|
||||||
@@ -2245,6 +2245,11 @@ public class IrTextTestCaseGenerated extends AbstractIrTextTestCase {
|
|||||||
runTest("compiler/testData/ir/irText/types/starProjection_OI.kt");
|
runTest("compiler/testData/ir/irText/types/starProjection_OI.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("typeAliasWithUnsafeVariance.kt")
|
||||||
|
public void testTypeAliasWithUnsafeVariance() throws Exception {
|
||||||
|
runTest("compiler/testData/ir/irText/types/typeAliasWithUnsafeVariance.kt");
|
||||||
|
}
|
||||||
|
|
||||||
@TestMetadata("compiler/testData/ir/irText/types/nullChecks")
|
@TestMetadata("compiler/testData/ir/irText/types/nullChecks")
|
||||||
@TestDataPath("$PROJECT_ROOT")
|
@TestDataPath("$PROJECT_ROOT")
|
||||||
@RunWith(JUnit3RunnerWithInners.class)
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
|
|||||||
Reference in New Issue
Block a user