[Test] Reproduce KT-65937
This commit is contained in:
committed by
Space Team
parent
cc2dcf0078
commit
3bf0a11ced
+18
-1
@@ -143,5 +143,22 @@ FILE fqName:<root> fileName:/selfReferentialAnnotation.kt
|
|||||||
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
|
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
|
||||||
FUN name:box visibility:public modality:FINAL <> () returnType:kotlin.String
|
FUN name:box visibility:public modality:FINAL <> () returnType:kotlin.String
|
||||||
BLOCK_BODY
|
BLOCK_BODY
|
||||||
|
VAR name:result type:kotlin.String [val]
|
||||||
|
CALL 'public final fun joinToString <T> (separator: kotlin.CharSequence, prefix: kotlin.CharSequence, postfix: kotlin.CharSequence, limit: kotlin.Int, truncated: kotlin.CharSequence, transform: kotlin.Function1<T of kotlin.collections.joinToString, kotlin.CharSequence>?): kotlin.String declared in kotlin.collections' type=kotlin.String origin=null
|
||||||
|
<T>: <root>.MyRequiresOptIn.MyLevel
|
||||||
|
$receiver: CALL 'public final fun values (): kotlin.Array<<root>.MyRequiresOptIn.MyLevel> declared in <root>.MyRequiresOptIn.MyLevel' type=kotlin.Array<<root>.MyRequiresOptIn.MyLevel> origin=null
|
||||||
RETURN type=kotlin.Nothing from='public final fun box (): kotlin.String declared in <root>'
|
RETURN type=kotlin.Nothing from='public final fun box (): kotlin.String declared in <root>'
|
||||||
CONST String type=kotlin.String value="OK"
|
BLOCK type=kotlin.String origin=WHEN
|
||||||
|
VAR IR_TEMPORARY_VARIABLE name:tmp_0 type:kotlin.String [val]
|
||||||
|
GET_VAR 'val result: kotlin.String declared in <root>.box' type=kotlin.String origin=null
|
||||||
|
WHEN type=kotlin.String origin=WHEN
|
||||||
|
BRANCH
|
||||||
|
if: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQ
|
||||||
|
arg0: GET_VAR 'val tmp_0: kotlin.String declared in <root>.box' type=kotlin.String origin=null
|
||||||
|
arg1: CONST String type=kotlin.String value="WARNING, ERROR"
|
||||||
|
then: CONST String type=kotlin.String value="OK"
|
||||||
|
BRANCH
|
||||||
|
if: CONST Boolean type=kotlin.Boolean value=true
|
||||||
|
then: STRING_CONCATENATION type=kotlin.String
|
||||||
|
CONST String type=kotlin.String value="Fail: "
|
||||||
|
GET_VAR 'val result: kotlin.String declared in <root>.box' type=kotlin.String origin=null
|
||||||
|
|||||||
+10
-1
@@ -39,5 +39,14 @@ FILE: selfReferentialAnnotation.kt
|
|||||||
|
|
||||||
}
|
}
|
||||||
public final fun box(): R|kotlin/String| {
|
public final fun box(): R|kotlin/String| {
|
||||||
^box String(OK)
|
lval result: R|kotlin/String| = Q|MyRequiresOptIn.MyLevel|.R|/MyRequiresOptIn.MyLevel.values*s|().R|kotlin/collections/joinToString|<R|MyRequiresOptIn.MyLevel|>()
|
||||||
|
^box when (R|<local>/result|) {
|
||||||
|
==($subj$, String(WARNING, ERROR)) -> {
|
||||||
|
String(OK)
|
||||||
|
}
|
||||||
|
else -> {
|
||||||
|
<strcat>(String(Fail: ), R|<local>/result|)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
+18
-1
@@ -143,5 +143,22 @@ FILE fqName:<root> fileName:/selfReferentialAnnotation.kt
|
|||||||
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
|
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
|
||||||
FUN name:box visibility:public modality:FINAL <> () returnType:kotlin.String
|
FUN name:box visibility:public modality:FINAL <> () returnType:kotlin.String
|
||||||
BLOCK_BODY
|
BLOCK_BODY
|
||||||
|
VAR name:result type:kotlin.String [val]
|
||||||
|
CALL 'public final fun joinToString <T> (separator: kotlin.CharSequence, prefix: kotlin.CharSequence, postfix: kotlin.CharSequence, limit: kotlin.Int, truncated: kotlin.CharSequence, transform: kotlin.Function1<T of kotlin.collections.joinToString, kotlin.CharSequence>?): kotlin.String declared in kotlin.collections' type=kotlin.String origin=null
|
||||||
|
<T>: <root>.MyRequiresOptIn.MyLevel
|
||||||
|
$receiver: CALL 'public final fun values (): kotlin.Array<<root>.MyRequiresOptIn.MyLevel> declared in <root>.MyRequiresOptIn.MyLevel' type=kotlin.Array<<root>.MyRequiresOptIn.MyLevel> origin=null
|
||||||
RETURN type=kotlin.Nothing from='public final fun box (): kotlin.String declared in <root>'
|
RETURN type=kotlin.Nothing from='public final fun box (): kotlin.String declared in <root>'
|
||||||
CONST String type=kotlin.String value="OK"
|
BLOCK type=kotlin.String origin=WHEN
|
||||||
|
VAR IR_TEMPORARY_VARIABLE name:tmp_0 type:kotlin.String [val]
|
||||||
|
GET_VAR 'val result: kotlin.String declared in <root>.box' type=kotlin.String origin=null
|
||||||
|
WHEN type=kotlin.String origin=WHEN
|
||||||
|
BRANCH
|
||||||
|
if: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQ
|
||||||
|
arg0: GET_VAR 'val tmp_0: kotlin.String declared in <root>.box' type=kotlin.String origin=null
|
||||||
|
arg1: CONST String type=kotlin.String value="WARNING, ERROR"
|
||||||
|
then: CONST String type=kotlin.String value="OK"
|
||||||
|
BRANCH
|
||||||
|
if: CONST Boolean type=kotlin.Boolean value=true
|
||||||
|
then: STRING_CONCATENATION type=kotlin.String
|
||||||
|
CONST String type=kotlin.String value="Fail: "
|
||||||
|
GET_VAR 'val result: kotlin.String declared in <root>.box' type=kotlin.String origin=null
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
// FIR_DUMP
|
// FIR_DUMP
|
||||||
// DUMP_IR
|
// DUMP_IR
|
||||||
|
// WITH_STDLIB
|
||||||
|
// IGNORE_BACKEND_K2: ANY
|
||||||
|
|
||||||
annotation class Ann(@Ann(1) val e: Int)
|
annotation class Ann(@Ann(1) val e: Int)
|
||||||
|
|
||||||
@@ -14,4 +16,10 @@ public annotation class MyRequiresOptIn(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fun box() = "OK"
|
fun box(): String {
|
||||||
|
val result = MyRequiresOptIn.MyLevel.values().joinToString()
|
||||||
|
return when (result) {
|
||||||
|
"WARNING, ERROR" -> "OK"
|
||||||
|
else -> "Fail: $result"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user