FIR2IR: create local classes on the fly properly
This commit is contained in:
committed by
teamcity
parent
a05244eca1
commit
67a05883d6
@@ -0,0 +1,62 @@
|
||||
FILE fqName:<root> fileName:/FlushFromAnonymous.kt
|
||||
CLASS CLASS name:Serializer modality:FINAL visibility:public superTypes:[kotlin.Any]
|
||||
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.Serializer
|
||||
CONSTRUCTOR visibility:public <> () returnType:<root>.Serializer [primary]
|
||||
BLOCK_BODY
|
||||
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in kotlin.Any'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Serializer modality:FINAL visibility:public superTypes:[kotlin.Any]'
|
||||
FUN name:serialize visibility:public modality:FINAL <> ($this:<root>.Serializer) returnType:kotlin.Unit
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.Serializer
|
||||
BLOCK_BODY
|
||||
VAR name:messageCollector type:<root>.Serializer.createMessageCollector.<no name provided> [val]
|
||||
CALL 'private final fun createMessageCollector (): <root>.Serializer.createMessageCollector.<no name provided> declared in <root>.Serializer' type=<root>.Serializer.createMessageCollector.<no name provided> origin=null
|
||||
$this: GET_VAR '<this>: <root>.Serializer declared in <root>.Serializer.serialize' type=<root>.Serializer origin=null
|
||||
TRY type=kotlin.Unit
|
||||
try: BLOCK type=kotlin.Unit origin=null
|
||||
CATCH parameter=val e: kotlin.Throwable [val] declared in <root>.Serializer.serialize
|
||||
VAR name:e type:kotlin.Throwable [val]
|
||||
BLOCK type=kotlin.Unit origin=null
|
||||
CALL 'public open fun flush (): kotlin.Unit [fake_override] declared in <root>.Serializer.createMessageCollector.<no name provided>' type=kotlin.Unit origin=null
|
||||
$this: GET_VAR 'val messageCollector: <root>.Serializer.createMessageCollector.<no name provided> [val] declared in <root>.Serializer.serialize' type=<root>.Serializer.createMessageCollector.<no name provided> origin=null
|
||||
FUN name:createMessageCollector visibility:private modality:FINAL <> ($this:<root>.Serializer) returnType:<root>.Serializer.createMessageCollector.<no name provided>
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.Serializer
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='private final fun createMessageCollector (): <root>.Serializer.createMessageCollector.<no name provided> declared in <root>.Serializer'
|
||||
BLOCK type=<root>.Serializer.createMessageCollector.<no name provided> origin=OBJECT_LITERAL
|
||||
CLASS CLASS name:<no name provided> modality:FINAL visibility:local superTypes:[<root>.Collector]
|
||||
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.Serializer.createMessageCollector.<no name provided>
|
||||
CONSTRUCTOR visibility:private <> () returnType:<root>.Serializer.createMessageCollector.<no name provided> [primary]
|
||||
BLOCK_BODY
|
||||
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in <root>.Collector'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:<no name provided> modality:FINAL visibility:local superTypes:[<root>.Collector]'
|
||||
FUN FAKE_OVERRIDE name:flush visibility:public modality:OPEN <> ($this:<root>.Collector) returnType:kotlin.Unit [fake_override]
|
||||
overridden:
|
||||
public open fun flush (): kotlin.Unit declared in <root>.Collector
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.Collector
|
||||
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 [fake_override,operator] declared in <root>.Collector
|
||||
$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 [fake_override] declared in <root>.Collector
|
||||
$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 [fake_override] declared in <root>.Collector
|
||||
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
|
||||
CONSTRUCTOR_CALL 'private constructor <init> () [primary] declared in <root>.Serializer.createMessageCollector.<no name provided>' type=<root>.Serializer.createMessageCollector.<no name provided> origin=OBJECT_LITERAL
|
||||
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
|
||||
@@ -0,0 +1,33 @@
|
||||
class Serializer {
|
||||
constructor() /* primary */ {
|
||||
super/*Any*/()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
fun serialize() {
|
||||
val messageCollector: <no name provided> = <this>.createMessageCollector()
|
||||
try { // BLOCK
|
||||
}
|
||||
catch (e: Throwable){ // BLOCK
|
||||
messageCollector.flush()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private fun createMessageCollector(): <no name provided> {
|
||||
return { // BLOCK
|
||||
local class <no name provided> : Collector {
|
||||
private constructor() /* primary */ {
|
||||
super/*Collector*/()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
<no name provided>()
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
FILE fqName:<root> fileName:/FlushFromAnonymous.kt
|
||||
CLASS CLASS name:Serializer modality:FINAL visibility:public superTypes:[kotlin.Any]
|
||||
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.Serializer
|
||||
CONSTRUCTOR visibility:public <> () returnType:<root>.Serializer [primary]
|
||||
BLOCK_BODY
|
||||
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in kotlin.Any'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:Serializer modality:FINAL visibility:public superTypes:[kotlin.Any]'
|
||||
FUN name:serialize visibility:public modality:FINAL <> ($this:<root>.Serializer) returnType:kotlin.Unit
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.Serializer
|
||||
BLOCK_BODY
|
||||
VAR name:messageCollector type:<root>.Serializer.createMessageCollector.<no name provided> [val]
|
||||
CALL 'private final fun createMessageCollector (): <root>.Serializer.createMessageCollector.<no name provided> declared in <root>.Serializer' type=<root>.Serializer.createMessageCollector.<no name provided> origin=null
|
||||
$this: GET_VAR '<this>: <root>.Serializer declared in <root>.Serializer.serialize' type=<root>.Serializer origin=null
|
||||
TRY type=kotlin.Unit
|
||||
try: BLOCK type=kotlin.Unit origin=null
|
||||
CATCH parameter=val e: kotlin.Throwable [val] declared in <root>.Serializer.serialize
|
||||
VAR CATCH_PARAMETER name:e type:kotlin.Throwable [val]
|
||||
BLOCK type=kotlin.Unit origin=null
|
||||
CALL 'public open fun flush (): kotlin.Unit [fake_override] declared in <root>.Serializer.createMessageCollector.<no name provided>' type=kotlin.Unit origin=null
|
||||
$this: GET_VAR 'val messageCollector: <root>.Serializer.createMessageCollector.<no name provided> [val] declared in <root>.Serializer.serialize' type=<root>.Serializer.createMessageCollector.<no name provided> origin=null
|
||||
FUN name:createMessageCollector visibility:private modality:FINAL <> ($this:<root>.Serializer) returnType:<root>.Serializer.createMessageCollector.<no name provided>
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.Serializer
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='private final fun createMessageCollector (): <root>.Serializer.createMessageCollector.<no name provided> declared in <root>.Serializer'
|
||||
BLOCK type=<root>.Serializer.createMessageCollector.<no name provided> origin=OBJECT_LITERAL
|
||||
CLASS CLASS name:<no name provided> modality:FINAL visibility:local superTypes:[<root>.Collector]
|
||||
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.Serializer.createMessageCollector.<no name provided>
|
||||
CONSTRUCTOR visibility:public <> () returnType:<root>.Serializer.createMessageCollector.<no name provided> [primary]
|
||||
BLOCK_BODY
|
||||
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in <root>.Collector'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:<no name provided> modality:FINAL visibility:local superTypes:[<root>.Collector]'
|
||||
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 [fake_override,operator] declared in <root>.Collector
|
||||
$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 [fake_override] declared in <root>.Collector
|
||||
$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 [fake_override] declared in <root>.Collector
|
||||
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
|
||||
FUN FAKE_OVERRIDE name:flush visibility:public modality:OPEN <> ($this:<root>.Collector) returnType:kotlin.Unit [fake_override]
|
||||
overridden:
|
||||
public open fun flush (): kotlin.Unit declared in <root>.Collector
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.Collector
|
||||
CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in <root>.Serializer.createMessageCollector.<no name provided>' type=<root>.Serializer.createMessageCollector.<no name provided> origin=OBJECT_LITERAL
|
||||
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
|
||||
@@ -0,0 +1,21 @@
|
||||
// SKIP_KLIB_TEST
|
||||
// FILE: Collector.java
|
||||
|
||||
public class Collector {
|
||||
public void flush() {}
|
||||
}
|
||||
|
||||
// FILE: FlushFromAnonymous.kt
|
||||
|
||||
class Serializer() {
|
||||
fun serialize() {
|
||||
val messageCollector = createMessageCollector()
|
||||
try {
|
||||
|
||||
} catch (e: Throwable) {
|
||||
messageCollector.flush()
|
||||
}
|
||||
}
|
||||
|
||||
private fun createMessageCollector() = object : Collector() {}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
class Serializer {
|
||||
constructor() /* primary */ {
|
||||
super/*Any*/()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
fun serialize() {
|
||||
val messageCollector: <no name provided> = <this>.createMessageCollector()
|
||||
try { // BLOCK
|
||||
}
|
||||
catch (e: Throwable){ // BLOCK
|
||||
messageCollector.flush()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private fun createMessageCollector(): <no name provided> {
|
||||
return { // BLOCK
|
||||
local class <no name provided> : Collector {
|
||||
constructor() /* primary */ {
|
||||
super/*Collector*/()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
<no name provided>()
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
+72
@@ -0,0 +1,72 @@
|
||||
FILE fqName:<root> fileName:/localClassUsedBeforeDeclaration.kt
|
||||
FUN name:box visibility:public modality:FINAL <> () returnType:kotlin.String
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun box (): kotlin.String declared in <root>'
|
||||
CALL 'public final fun <get-ok> (): kotlin.String declared in <root>.box.<no name provided>.A' type=kotlin.String origin=GET_PROPERTY
|
||||
$this: CALL 'public final fun <get-a> (): <root>.box.<no name provided>.A declared in <root>.box.<no name provided>' type=<root>.box.<no name provided>.A origin=GET_PROPERTY
|
||||
$this: BLOCK type=<root>.box.<no name provided> origin=OBJECT_LITERAL
|
||||
CLASS CLASS name:<no name provided> modality:FINAL visibility:local superTypes:[kotlin.Any]
|
||||
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.box.<no name provided>
|
||||
CONSTRUCTOR visibility:private <> () returnType:<root>.box.<no name provided> [primary]
|
||||
BLOCK_BODY
|
||||
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in kotlin.Any'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:<no name provided> modality:FINAL visibility:local superTypes:[kotlin.Any]'
|
||||
PROPERTY name:a visibility:public modality:FINAL [val]
|
||||
FIELD PROPERTY_BACKING_FIELD name:a type:<root>.box.<no name provided>.A visibility:private [final]
|
||||
EXPRESSION_BODY
|
||||
CONSTRUCTOR_CALL 'public constructor <init> (ok: kotlin.String) [primary] declared in <root>.box.<no name provided>.A' type=<root>.box.<no name provided>.A origin=null
|
||||
$outer: GET_VAR '<this>: <root>.box.<no name provided> declared in <root>.box.<no name provided>' type=<root>.box.<no name provided> origin=null
|
||||
ok: CONST String type=kotlin.String value="OK"
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-a> visibility:public modality:FINAL <> ($this:<root>.box.<no name provided>) returnType:<root>.box.<no name provided>.A
|
||||
correspondingProperty: PROPERTY name:a visibility:public modality:FINAL [val]
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.box.<no name provided>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun <get-a> (): <root>.box.<no name provided>.A declared in <root>.box.<no name provided>'
|
||||
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:a type:<root>.box.<no name provided>.A visibility:private [final]' type=<root>.box.<no name provided>.A origin=null
|
||||
receiver: GET_VAR '<this>: <root>.box.<no name provided> declared in <root>.box.<no name provided>.<get-a>' type=<root>.box.<no name provided> origin=null
|
||||
CLASS CLASS name:A modality:FINAL visibility:local [inner] superTypes:[kotlin.Any]
|
||||
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.box.<no name provided>.A
|
||||
CONSTRUCTOR visibility:public <> ($this:<root>.box.<no name provided>, ok:kotlin.String) returnType:<root>.box.<no name provided>.A [primary]
|
||||
$outer: VALUE_PARAMETER name:<this> type:<root>.box.<no name provided>
|
||||
VALUE_PARAMETER name:ok index:0 type:kotlin.String
|
||||
BLOCK_BODY
|
||||
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in kotlin.Any'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:A modality:FINAL visibility:local [inner] superTypes:[kotlin.Any]'
|
||||
PROPERTY name:ok visibility:public modality:FINAL [val]
|
||||
FIELD PROPERTY_BACKING_FIELD name:ok type:kotlin.String visibility:private [final]
|
||||
EXPRESSION_BODY
|
||||
GET_VAR 'ok: kotlin.String declared in <root>.box.<no name provided>.A.<init>' type=kotlin.String origin=INITIALIZE_PROPERTY_FROM_PARAMETER
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-ok> visibility:public modality:FINAL <> ($this:<root>.box.<no name provided>.A) returnType:kotlin.String
|
||||
correspondingProperty: PROPERTY name:ok visibility:public modality:FINAL [val]
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.box.<no name provided>.A
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun <get-ok> (): kotlin.String declared in <root>.box.<no name provided>.A'
|
||||
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:ok type:kotlin.String visibility:private [final]' type=kotlin.String origin=null
|
||||
receiver: GET_VAR '<this>: <root>.box.<no name provided>.A declared in <root>.box.<no name provided>.A.<get-ok>' type=<root>.box.<no name provided>.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 [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 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
|
||||
CONSTRUCTOR_CALL 'private constructor <init> () [primary] declared in <root>.box.<no name provided>' type=<root>.box.<no name provided> origin=OBJECT_LITERAL
|
||||
+31
@@ -0,0 +1,31 @@
|
||||
fun box(): String {
|
||||
return { // BLOCK
|
||||
local class <no name provided> {
|
||||
private constructor() /* primary */ {
|
||||
super/*Any*/()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
val a: A
|
||||
field = <this>.A(ok = "OK")
|
||||
get
|
||||
|
||||
local inner class A {
|
||||
constructor(ok: String) /* primary */ {
|
||||
super/*Any*/()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
val ok: String
|
||||
field = ok
|
||||
get
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
<no name provided>()
|
||||
}.<get-a>().<get-ok>()
|
||||
}
|
||||
+72
@@ -0,0 +1,72 @@
|
||||
FILE fqName:<root> fileName:/localClassUsedBeforeDeclaration.kt
|
||||
FUN name:box visibility:public modality:FINAL <> () returnType:kotlin.String
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun box (): kotlin.String declared in <root>'
|
||||
CALL 'public final fun <get-ok> (): kotlin.String declared in <root>.box.<no name provided>.A' type=kotlin.String origin=GET_PROPERTY
|
||||
$this: CALL 'public final fun <get-a> (): <root>.box.<no name provided>.A declared in <root>.box.<no name provided>' type=<root>.box.<no name provided>.A origin=GET_PROPERTY
|
||||
$this: BLOCK type=<root>.box.<no name provided> origin=OBJECT_LITERAL
|
||||
CLASS CLASS name:<no name provided> modality:FINAL visibility:local superTypes:[kotlin.Any]
|
||||
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.box.<no name provided>
|
||||
CONSTRUCTOR visibility:public <> () returnType:<root>.box.<no name provided> [primary]
|
||||
BLOCK_BODY
|
||||
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in kotlin.Any'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:<no name provided> modality:FINAL visibility:local superTypes:[kotlin.Any]'
|
||||
PROPERTY name:a visibility:public modality:FINAL [val]
|
||||
FIELD PROPERTY_BACKING_FIELD name:a type:<root>.box.<no name provided>.A visibility:private [final]
|
||||
EXPRESSION_BODY
|
||||
CONSTRUCTOR_CALL 'public constructor <init> (ok: kotlin.String) [primary] declared in <root>.box.<no name provided>.A' type=<root>.box.<no name provided>.A origin=null
|
||||
$outer: GET_VAR '<this>: <root>.box.<no name provided> declared in <root>.box.<no name provided>' type=<root>.box.<no name provided> origin=null
|
||||
ok: CONST String type=kotlin.String value="OK"
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-a> visibility:public modality:FINAL <> ($this:<root>.box.<no name provided>) returnType:<root>.box.<no name provided>.A
|
||||
correspondingProperty: PROPERTY name:a visibility:public modality:FINAL [val]
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.box.<no name provided>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun <get-a> (): <root>.box.<no name provided>.A declared in <root>.box.<no name provided>'
|
||||
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:a type:<root>.box.<no name provided>.A visibility:private [final]' type=<root>.box.<no name provided>.A origin=null
|
||||
receiver: GET_VAR '<this>: <root>.box.<no name provided> declared in <root>.box.<no name provided>.<get-a>' type=<root>.box.<no name provided> origin=null
|
||||
CLASS CLASS name:A modality:FINAL visibility:local [inner] superTypes:[kotlin.Any]
|
||||
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.box.<no name provided>.A
|
||||
CONSTRUCTOR visibility:public <> ($this:<root>.box.<no name provided>, ok:kotlin.String) returnType:<root>.box.<no name provided>.A [primary]
|
||||
$outer: VALUE_PARAMETER name:<this> type:<root>.box.<no name provided>
|
||||
VALUE_PARAMETER name:ok index:0 type:kotlin.String
|
||||
BLOCK_BODY
|
||||
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in kotlin.Any'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:A modality:FINAL visibility:local [inner] superTypes:[kotlin.Any]'
|
||||
PROPERTY name:ok visibility:public modality:FINAL [val]
|
||||
FIELD PROPERTY_BACKING_FIELD name:ok type:kotlin.String visibility:private [final]
|
||||
EXPRESSION_BODY
|
||||
GET_VAR 'ok: kotlin.String declared in <root>.box.<no name provided>.A.<init>' type=kotlin.String origin=INITIALIZE_PROPERTY_FROM_PARAMETER
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-ok> visibility:public modality:FINAL <> ($this:<root>.box.<no name provided>.A) returnType:kotlin.String
|
||||
correspondingProperty: PROPERTY name:ok visibility:public modality:FINAL [val]
|
||||
$this: VALUE_PARAMETER name:<this> type:<root>.box.<no name provided>.A
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun <get-ok> (): kotlin.String declared in <root>.box.<no name provided>.A'
|
||||
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:ok type:kotlin.String visibility:private [final]' type=kotlin.String origin=null
|
||||
receiver: GET_VAR '<this>: <root>.box.<no name provided>.A declared in <root>.box.<no name provided>.A.<get-ok>' type=<root>.box.<no name provided>.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 [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 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
|
||||
CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in <root>.box.<no name provided>' type=<root>.box.<no name provided> origin=OBJECT_LITERAL
|
||||
@@ -0,0 +1,6 @@
|
||||
fun box(): String {
|
||||
return object {
|
||||
val a = A("OK")
|
||||
inner class A(val ok: String)
|
||||
}.a.ok
|
||||
}
|
||||
+31
@@ -0,0 +1,31 @@
|
||||
fun box(): String {
|
||||
return { // BLOCK
|
||||
local class <no name provided> {
|
||||
constructor() /* primary */ {
|
||||
super/*Any*/()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
val a: A
|
||||
field = <this>.A(ok = "OK")
|
||||
get
|
||||
|
||||
local inner class A {
|
||||
constructor(ok: String) /* primary */ {
|
||||
super/*Any*/()
|
||||
/* <init>() */
|
||||
|
||||
}
|
||||
|
||||
val ok: String
|
||||
field = ok
|
||||
get
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
<no name provided>()
|
||||
}.<get-a>().<get-ok>()
|
||||
}
|
||||
Reference in New Issue
Block a user