[IR] Render type abbreviations by default, and not render in irText tests

^KT-60248


Merge-request: KT-MR-11510
Merged-by: Vladimir Sukharev <Vladimir.Sukharev@jetbrains.com>
This commit is contained in:
Vladimir Sukharev
2023-08-14 15:08:45 +00:00
committed by Space Team
parent ef338865c7
commit 5b825282a4
43 changed files with 215 additions and 407 deletions
@@ -1,14 +0,0 @@
FILE fqName:<root> fileName:/catchParameterAccess.kt
FUN name:test visibility:public modality:FINAL <> (f:kotlin.Function0<kotlin.Unit>) returnType:kotlin.Unit
VALUE_PARAMETER name:f index:0 type:kotlin.Function0<kotlin.Unit>
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun test (f: kotlin.Function0<kotlin.Unit>): kotlin.Unit declared in <root>'
TRY type=kotlin.Unit
try: BLOCK type=kotlin.Unit origin=null
CALL 'public abstract fun invoke (): R of kotlin.Function0 declared in kotlin.Function0' type=kotlin.Unit origin=INVOKE
$this: GET_VAR 'f: kotlin.Function0<kotlin.Unit> declared in <root>.test' type=kotlin.Function0<kotlin.Unit> origin=VARIABLE_AS_FUNCTION
CATCH parameter=val e: java.lang.Exception declared in <root>.test
VAR CATCH_PARAMETER name:e type:java.lang.Exception [val]
BLOCK type=kotlin.Nothing origin=null
THROW type=kotlin.Nothing
GET_VAR 'val e: java.lang.Exception declared in <root>.test' type=java.lang.Exception origin=null
@@ -1,10 +0,0 @@
fun test(f: Function0<Unit>) {
return try { // BLOCK
f.invoke()
}
catch (e: Exception){ // BLOCK
throw e
}
}
@@ -7,8 +7,8 @@ FILE fqName:<root> fileName:/catchParameterAccess.kt
try: BLOCK type=kotlin.Unit origin=null
CALL 'public abstract fun invoke (): R of kotlin.Function0 declared in kotlin.Function0' type=kotlin.Unit origin=INVOKE
$this: GET_VAR 'f: kotlin.Function0<kotlin.Unit> declared in <root>.test' type=kotlin.Function0<kotlin.Unit> origin=VARIABLE_AS_FUNCTION
CATCH parameter=val e: java.lang.Exception{ kotlin.Exception } declared in <root>.test
VAR CATCH_PARAMETER name:e type:java.lang.Exception{ kotlin.Exception } [val]
CATCH parameter=val e: java.lang.Exception declared in <root>.test
VAR CATCH_PARAMETER name:e type:java.lang.Exception [val]
BLOCK type=kotlin.Nothing origin=null
THROW type=kotlin.Nothing
GET_VAR 'val e: java.lang.Exception{ kotlin.Exception } declared in <root>.test' type=java.lang.Exception{ kotlin.Exception } origin=null
GET_VAR 'val e: java.lang.Exception declared in <root>.test' type=java.lang.Exception origin=null
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
// IGNORE_BACKEND: JS_IR
// IGNORE_BACKEND: JS_IR_ES6
+4 -4
View File
@@ -46,14 +46,14 @@ FILE fqName:<root> fileName:/kt16905.kt
overridden:
public open fun toString (): kotlin.String declared in <root>.Outer.Inner
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
CLASS CLASS name:InnerDerived1 modality:FINAL visibility:public [inner] superTypes:[<root>.Outer.Inner{ <root>.OI }]
CLASS CLASS name:InnerDerived1 modality:FINAL visibility:public [inner] superTypes:[<root>.Outer.Inner]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.Outer.InnerDerived1
CONSTRUCTOR visibility:public <> ($this:<root>.Outer) returnType:<root>.Outer.InnerDerived1 [primary]
$outer: VALUE_PARAMETER name:<this> type:<root>.Outer
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () declared in <root>.Outer.Inner'
$this: GET_VAR '<this>: <root>.Outer declared in <root>.Outer.InnerDerived1.<init>' type=<root>.Outer origin=null
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:InnerDerived1 modality:FINAL visibility:public [inner] superTypes:[<root>.Outer.Inner{ <root>.OI }]'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:InnerDerived1 modality:FINAL visibility:public [inner] superTypes:[<root>.Outer.Inner]'
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 declared in <root>.Outer.Inner
@@ -81,8 +81,8 @@ FILE fqName:<root> fileName:/kt16905.kt
public open fun toString (): kotlin.String declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
TYPEALIAS name:OI visibility:public expandedType:<root>.Outer.Inner
FUN name:test visibility:public modality:FINAL <> () returnType:<root>.Outer.Inner{ <root>.OI }
FUN name:test visibility:public modality:FINAL <> () returnType:<root>.Outer.Inner
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun test (): <root>.Outer.Inner{ <root>.OI } declared in <root>'
RETURN type=kotlin.Nothing from='public final fun test (): <root>.Outer.Inner declared in <root>'
CONSTRUCTOR_CALL 'public constructor <init> () declared in <root>.Outer.Inner' type=<root>.Outer.Inner origin=null
$outer: CONSTRUCTOR_CALL 'public constructor <init> () declared in <root>.Outer' type=<root>.Outer origin=null
@@ -1,56 +0,0 @@
FILE fqName:<root> fileName:/kt48806.kt
CLASS CLASS name:A modality:FINAL visibility:public superTypes:[kotlin.Any]
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.A
CONSTRUCTOR visibility:public <> () returnType:<root>.A [primary]
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () declared in kotlin.Any'
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:A modality:FINAL visibility:public superTypes:[kotlin.Any]'
PROPERTY name:test_1 visibility:public modality:FINAL [val]
FIELD PROPERTY_BACKING_FIELD name:test_1 type:kotlin.Int visibility:private [final]
EXPRESSION_BODY
TRY type=kotlin.Int
try: BLOCK type=kotlin.Nothing origin=null
THROW type=kotlin.Nothing
CONSTRUCTOR_CALL 'public constructor <init> () declared in java.lang.RuntimeException' type=java.lang.RuntimeException origin=null
CATCH parameter=val e: java.lang.Exception declared in <root>.A.test_1
VAR CATCH_PARAMETER name:e type:java.lang.Exception [val]
BLOCK type=kotlin.Int origin=null
CONST Int type=kotlin.Int value=1
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-test_1> visibility:public modality:FINAL <> ($this:<root>.A) returnType:kotlin.Int
correspondingProperty: PROPERTY name:test_1 visibility:public modality:FINAL [val]
$this: VALUE_PARAMETER name:<this> type:<root>.A
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun <get-test_1> (): kotlin.Int declared in <root>.A'
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:test_1 type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null
receiver: GET_VAR '<this>: <root>.A declared in <root>.A.<get-test_1>' type=<root>.A origin=null
PROPERTY name:test_2 visibility:public modality:FINAL [val]
FIELD PROPERTY_BACKING_FIELD name:test_2 type:kotlin.Int visibility:private [final]
EXPRESSION_BODY
TRY type=kotlin.Int
try: BLOCK type=kotlin.Int origin=null
CONST Int type=kotlin.Int value=1
CATCH parameter=val e: java.lang.Exception declared in <root>.A.test_2
VAR CATCH_PARAMETER name:e type:java.lang.Exception [val]
BLOCK type=kotlin.Nothing origin=null
THROW type=kotlin.Nothing
CONSTRUCTOR_CALL 'public constructor <init> () declared in java.lang.RuntimeException' type=java.lang.RuntimeException origin=null
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-test_2> visibility:public modality:FINAL <> ($this:<root>.A) returnType:kotlin.Int
correspondingProperty: PROPERTY name:test_2 visibility:public modality:FINAL [val]
$this: VALUE_PARAMETER name:<this> type:<root>.A
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun <get-test_2> (): kotlin.Int declared in <root>.A'
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:test_2 type:kotlin.Int visibility:private [final]' type=kotlin.Int origin=null
receiver: GET_VAR '<this>: <root>.A declared in <root>.A.<get-test_2>' type=<root>.A 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 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
@@ -1,29 +0,0 @@
class A {
constructor() /* primary */ {
super/*Any*/()
/* <init>() */
}
val test_1: Int
field = try { // BLOCK
throw RuntimeException()
}
catch (e: Exception){ // BLOCK
1
}
get
val test_2: Int
field = try { // BLOCK
1
}
catch (e: Exception){ // BLOCK
throw RuntimeException()
}
get
}
+4 -4
View File
@@ -12,8 +12,8 @@ FILE fqName:<root> fileName:/kt48806.kt
try: BLOCK type=kotlin.Nothing origin=null
THROW type=kotlin.Nothing
CONSTRUCTOR_CALL 'public constructor <init> () declared in java.lang.RuntimeException' type=java.lang.RuntimeException origin=null
CATCH parameter=val e: java.lang.Exception{ kotlin.Exception } declared in <root>.A.test_1
VAR CATCH_PARAMETER name:e type:java.lang.Exception{ kotlin.Exception } [val]
CATCH parameter=val e: java.lang.Exception declared in <root>.A.test_1
VAR CATCH_PARAMETER name:e type:java.lang.Exception [val]
BLOCK type=kotlin.Int origin=null
CONST Int type=kotlin.Int value=1
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-test_1> visibility:public modality:FINAL <> ($this:<root>.A) returnType:kotlin.Int
@@ -29,8 +29,8 @@ FILE fqName:<root> fileName:/kt48806.kt
TRY type=kotlin.Int
try: BLOCK type=kotlin.Int origin=null
CONST Int type=kotlin.Int value=1
CATCH parameter=val e: java.lang.Exception{ kotlin.Exception } declared in <root>.A.test_2
VAR CATCH_PARAMETER name:e type:java.lang.Exception{ kotlin.Exception } [val]
CATCH parameter=val e: java.lang.Exception declared in <root>.A.test_2
VAR CATCH_PARAMETER name:e type:java.lang.Exception [val]
BLOCK type=kotlin.Nothing origin=null
THROW type=kotlin.Nothing
CONSTRUCTOR_CALL 'public constructor <init> () declared in java.lang.RuntimeException' type=java.lang.RuntimeException origin=null
+1
View File
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
// IGNORE_BACKEND: JS_IR
// IGNORE_BACKEND: JS_IR_ES6
// ISSUE: KT-48806
@@ -32,9 +32,9 @@ FILE fqName:<root> fileName:/specializedTypeAliasConstructorCall.kt
public open fun toString (): kotlin.String declared in kotlin.Any
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
TYPEALIAS name:IntAlias visibility:public expandedType:<root>.Cell<kotlin.Int>
FUN name:test visibility:public modality:FINAL <> () returnType:<root>.Cell<kotlin.Int>{ <root>.IntAlias }
FUN name:test visibility:public modality:FINAL <> () returnType:<root>.Cell<kotlin.Int>
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun test (): <root>.Cell<kotlin.Int>{ <root>.IntAlias } declared in <root>'
RETURN type=kotlin.Nothing from='public final fun test (): <root>.Cell<kotlin.Int> declared in <root>'
CONSTRUCTOR_CALL 'public constructor <init> (value: T of <root>.Cell) declared in <root>.Cell' type=<root>.Cell<kotlin.Int> origin=null
<class: T>: kotlin.Int
value: CONST Int type=kotlin.Int value=42
@@ -61,20 +61,20 @@ FILE fqName:<root> fileName:/typeAliasConstructorReference.kt
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
TYPEALIAS name:NA visibility:public expandedType:<root>.Host.Nested
PROPERTY name:test1 visibility:public modality:FINAL [val]
FIELD PROPERTY_BACKING_FIELD name:test1 type:kotlin.Function1<kotlin.Int, <root>.C{ <root>.CA }> visibility:private [final,static]
FIELD PROPERTY_BACKING_FIELD name:test1 type:kotlin.Function1<kotlin.Int, <root>.C> visibility:private [final,static]
EXPRESSION_BODY
FUNCTION_REFERENCE 'public constructor <init> (x: kotlin.Int) declared in <root>.C' type=kotlin.reflect.KFunction1<@[ParameterName(name = 'x')] kotlin.Int, <root>.C{ <root>.CA }> origin=null reflectionTarget=<same>
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-test1> visibility:public modality:FINAL <> () returnType:kotlin.Function1<kotlin.Int, <root>.C{ <root>.CA }>
FUNCTION_REFERENCE 'public constructor <init> (x: kotlin.Int) declared in <root>.C' type=kotlin.reflect.KFunction1<@[ParameterName(name = 'x')] kotlin.Int, <root>.C> origin=null reflectionTarget=<same>
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-test1> visibility:public modality:FINAL <> () returnType:kotlin.Function1<kotlin.Int, <root>.C>
correspondingProperty: PROPERTY name:test1 visibility:public modality:FINAL [val]
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun <get-test1> (): kotlin.Function1<kotlin.Int, <root>.C{ <root>.CA }> declared in <root>'
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:test1 type:kotlin.Function1<kotlin.Int, <root>.C{ <root>.CA }> visibility:private [final,static]' type=kotlin.Function1<kotlin.Int, <root>.C{ <root>.CA }> origin=null
RETURN type=kotlin.Nothing from='public final fun <get-test1> (): kotlin.Function1<kotlin.Int, <root>.C> declared in <root>'
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:test1 type:kotlin.Function1<kotlin.Int, <root>.C> visibility:private [final,static]' type=kotlin.Function1<kotlin.Int, <root>.C> origin=null
PROPERTY name:test2 visibility:public modality:FINAL [val]
FIELD PROPERTY_BACKING_FIELD name:test2 type:kotlin.Function1<kotlin.Int, <root>.Host.Nested{ <root>.NA }> visibility:private [final,static]
FIELD PROPERTY_BACKING_FIELD name:test2 type:kotlin.Function1<kotlin.Int, <root>.Host.Nested> visibility:private [final,static]
EXPRESSION_BODY
FUNCTION_REFERENCE 'public constructor <init> (x: kotlin.Int) declared in <root>.Host.Nested' type=kotlin.reflect.KFunction1<@[ParameterName(name = 'x')] kotlin.Int, <root>.Host.Nested{ <root>.NA }> origin=null reflectionTarget=<same>
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-test2> visibility:public modality:FINAL <> () returnType:kotlin.Function1<kotlin.Int, <root>.Host.Nested{ <root>.NA }>
FUNCTION_REFERENCE 'public constructor <init> (x: kotlin.Int) declared in <root>.Host.Nested' type=kotlin.reflect.KFunction1<@[ParameterName(name = 'x')] kotlin.Int, <root>.Host.Nested> origin=null reflectionTarget=<same>
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-test2> visibility:public modality:FINAL <> () returnType:kotlin.Function1<kotlin.Int, <root>.Host.Nested>
correspondingProperty: PROPERTY name:test2 visibility:public modality:FINAL [val]
BLOCK_BODY
RETURN type=kotlin.Nothing from='public final fun <get-test2> (): kotlin.Function1<kotlin.Int, <root>.Host.Nested{ <root>.NA }> declared in <root>'
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:test2 type:kotlin.Function1<kotlin.Int, <root>.Host.Nested{ <root>.NA }> visibility:private [final,static]' type=kotlin.Function1<kotlin.Int, <root>.Host.Nested{ <root>.NA }> origin=null
RETURN type=kotlin.Nothing from='public final fun <get-test2> (): kotlin.Function1<kotlin.Int, <root>.Host.Nested> declared in <root>'
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:test2 type:kotlin.Function1<kotlin.Int, <root>.Host.Nested> visibility:private [final,static]' type=kotlin.Function1<kotlin.Int, <root>.Host.Nested> origin=null