[FIR] add more tests diagnostic tests on data and delegated classes
^KT-63522 ^KT-63512 ^KT-63042
This commit is contained in:
committed by
Space Team
parent
fab63e38aa
commit
b3b184f00d
@@ -0,0 +1,109 @@
|
||||
FILE fqName:second fileName:/nestedNameClash.kt
|
||||
FUN name:box visibility:public modality:FINAL <> () returnType:kotlin.String
|
||||
BLOCK_BODY
|
||||
VAR name:data type:second.MyClass [val]
|
||||
CONSTRUCTOR_CALL 'public constructor <init> (prop: second.Base<second.Base<kotlin.Int>>) declared in second.MyClass' type=second.MyClass origin=null
|
||||
prop: BLOCK type=second.box.<no name provided> origin=OBJECT_LITERAL
|
||||
CLASS CLASS name:<no name provided> modality:FINAL visibility:local superTypes:[second.Base<second.Base<kotlin.Int>>]
|
||||
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:second.box.<no name provided>
|
||||
CONSTRUCTOR visibility:public <> () returnType:second.box.<no name provided> [primary]
|
||||
BLOCK_BODY
|
||||
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () declared in kotlin.Any'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:<no name provided> modality:FINAL visibility:local superTypes:[second.Base<second.Base<kotlin.Int>>]'
|
||||
FUN FAKE_OVERRIDE name:foo visibility:public modality:OPEN <> ($this:second.Base<second.Base<kotlin.Int>>) returnType:kotlin.String [fake_override]
|
||||
overridden:
|
||||
public open fun foo (): kotlin.String declared in second.Base
|
||||
$this: VALUE_PARAMETER name:<this> type:second.Base<second.Base<kotlin.Int>>
|
||||
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 second.Base
|
||||
$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 second.Base
|
||||
$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 second.Base
|
||||
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
|
||||
CONSTRUCTOR_CALL 'public constructor <init> () declared in second.box.<no name provided>' type=second.box.<no name provided> origin=OBJECT_LITERAL
|
||||
RETURN type=kotlin.Nothing from='public final fun box (): kotlin.String declared in second'
|
||||
CALL 'public open fun foo (): kotlin.String declared in second.MyClass' type=kotlin.String origin=null
|
||||
$this: GET_VAR 'val data: second.MyClass declared in second.box' type=second.MyClass origin=null
|
||||
CLASS INTERFACE name:Base modality:ABSTRACT visibility:public superTypes:[kotlin.Any]
|
||||
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:second.Base<A of second.Base>
|
||||
TYPE_PARAMETER name:A index:0 variance: superTypes:[kotlin.Any?] reified:false
|
||||
FUN name:foo visibility:public modality:OPEN <> ($this:second.Base<A of second.Base>) returnType:kotlin.String
|
||||
$this: VALUE_PARAMETER name:<this> type:second.Base<A of second.Base>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public open fun foo (): kotlin.String declared in second.Base'
|
||||
CONST String type=kotlin.String value="OK"
|
||||
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
|
||||
CLASS CLASS name:MyClass modality:FINAL visibility:public superTypes:[second.Base<second.Base<kotlin.Int>>]
|
||||
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:second.MyClass
|
||||
CONSTRUCTOR visibility:public <> (prop:second.Base<second.Base<kotlin.Int>>) returnType:second.MyClass [primary]
|
||||
VALUE_PARAMETER name:prop index:0 type:second.Base<second.Base<kotlin.Int>>
|
||||
BLOCK_BODY
|
||||
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () declared in kotlin.Any'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:MyClass modality:FINAL visibility:public superTypes:[second.Base<second.Base<kotlin.Int>>]'
|
||||
PROPERTY name:prop visibility:public modality:FINAL [val]
|
||||
FIELD PROPERTY_BACKING_FIELD name:prop type:second.Base<second.Base<kotlin.Int>> visibility:private [final]
|
||||
EXPRESSION_BODY
|
||||
GET_VAR 'prop: second.Base<second.Base<kotlin.Int>> declared in second.MyClass.<init>' type=second.Base<second.Base<kotlin.Int>> origin=INITIALIZE_PROPERTY_FROM_PARAMETER
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-prop> visibility:public modality:FINAL <> ($this:second.MyClass) returnType:second.Base<second.Base<kotlin.Int>>
|
||||
correspondingProperty: PROPERTY name:prop visibility:public modality:FINAL [val]
|
||||
$this: VALUE_PARAMETER name:<this> type:second.MyClass
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun <get-prop> (): second.Base<second.Base<kotlin.Int>> declared in second.MyClass'
|
||||
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:prop type:second.Base<second.Base<kotlin.Int>> visibility:private [final]' type=second.Base<second.Base<kotlin.Int>> origin=null
|
||||
receiver: GET_VAR '<this>: second.MyClass declared in second.MyClass.<get-prop>' type=second.MyClass origin=null
|
||||
FUN DELEGATED_MEMBER name:foo visibility:public modality:OPEN <> ($this:second.MyClass) returnType:kotlin.String
|
||||
overridden:
|
||||
public open fun foo (): kotlin.String declared in second.Base
|
||||
$this: VALUE_PARAMETER name:<this> type:second.MyClass
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public open fun foo (): kotlin.String declared in second.MyClass'
|
||||
CALL 'public open fun foo (): kotlin.String declared in second.Base' type=kotlin.String origin=null
|
||||
$this: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:prop type:second.Base<second.Base<kotlin.Int>> visibility:private [final]' type=second.Base<second.Base<kotlin.Int>> origin=null
|
||||
receiver: GET_VAR '<this>: second.MyClass declared in second.MyClass.foo' type=second.MyClass origin=null
|
||||
CLASS INTERFACE name:Base modality:ABSTRACT visibility:public superTypes:[kotlin.Any]
|
||||
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:second.MyClass.Base
|
||||
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
|
||||
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 second.Base
|
||||
$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 second.Base
|
||||
$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 second.Base
|
||||
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
|
||||
@@ -0,0 +1,16 @@
|
||||
// DUMP_IR
|
||||
// IGNORE_BACKEND_K2: ANY
|
||||
package second
|
||||
|
||||
fun box(): String {
|
||||
val data = MyClass(object : Base<Base<Int>> {})
|
||||
return data.foo()
|
||||
}
|
||||
|
||||
interface Base<A> {
|
||||
fun foo(): String = "OK"
|
||||
}
|
||||
|
||||
class MyClass(val prop: second.Base<second.Base<Int>>): Base<Base<Int>> by prop {
|
||||
interface Base
|
||||
}
|
||||
@@ -0,0 +1,103 @@
|
||||
FILE fqName:second fileName:/nestedNameClash2.kt
|
||||
FUN name:box visibility:public modality:FINAL <> () returnType:kotlin.String
|
||||
BLOCK_BODY
|
||||
VAR name:data type:second.MyClass [val]
|
||||
CONSTRUCTOR_CALL 'public constructor <init> (prop: second.Base) declared in second.MyClass' type=second.MyClass origin=null
|
||||
prop: BLOCK type=second.box.<no name provided> origin=OBJECT_LITERAL
|
||||
CLASS CLASS name:<no name provided> modality:FINAL visibility:local superTypes:[second.Base]
|
||||
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:second.box.<no name provided>
|
||||
CONSTRUCTOR visibility:public <> () returnType:second.box.<no name provided> [primary]
|
||||
BLOCK_BODY
|
||||
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () declared in kotlin.Any'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:<no name provided> modality:FINAL visibility:local superTypes:[second.Base]'
|
||||
FUN FAKE_OVERRIDE name:foo visibility:public modality:OPEN <> ($this:second.Base) returnType:kotlin.String [fake_override]
|
||||
overridden:
|
||||
public open fun foo (): kotlin.String declared in second.Base
|
||||
$this: VALUE_PARAMETER name:<this> type:second.Base
|
||||
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 second.Base
|
||||
$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 second.Base
|
||||
$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 second.Base
|
||||
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
|
||||
CONSTRUCTOR_CALL 'public constructor <init> () declared in second.box.<no name provided>' type=second.box.<no name provided> origin=OBJECT_LITERAL
|
||||
RETURN type=kotlin.Nothing from='public final fun box (): kotlin.String declared in second'
|
||||
CALL 'public open fun foo (): kotlin.String declared in second.MyClass' type=kotlin.String origin=null
|
||||
$this: GET_VAR 'val data: second.MyClass declared in second.box' type=second.MyClass origin=null
|
||||
CLASS INTERFACE name:Base modality:ABSTRACT visibility:public superTypes:[kotlin.Any]
|
||||
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:second.Base
|
||||
FUN name:foo visibility:public modality:OPEN <> ($this:second.Base) returnType:kotlin.String
|
||||
$this: VALUE_PARAMETER name:<this> type:second.Base
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public open fun foo (): kotlin.String declared in second.Base'
|
||||
CONST String type=kotlin.String value="OK"
|
||||
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
|
||||
CLASS CLASS name:MyClass modality:FINAL visibility:public superTypes:[second.Base]
|
||||
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:second.MyClass
|
||||
CONSTRUCTOR visibility:public <> (prop:second.Base) returnType:second.MyClass [primary]
|
||||
VALUE_PARAMETER name:prop index:0 type:second.Base
|
||||
BLOCK_BODY
|
||||
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () declared in kotlin.Any'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:MyClass modality:FINAL visibility:public superTypes:[second.Base]'
|
||||
PROPERTY name:prop visibility:public modality:FINAL [val]
|
||||
FIELD PROPERTY_BACKING_FIELD name:prop type:second.Base visibility:private [final]
|
||||
EXPRESSION_BODY
|
||||
GET_VAR 'prop: second.Base declared in second.MyClass.<init>' type=second.Base origin=INITIALIZE_PROPERTY_FROM_PARAMETER
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-prop> visibility:public modality:FINAL <> ($this:second.MyClass) returnType:second.Base
|
||||
correspondingProperty: PROPERTY name:prop visibility:public modality:FINAL [val]
|
||||
$this: VALUE_PARAMETER name:<this> type:second.MyClass
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun <get-prop> (): second.Base declared in second.MyClass'
|
||||
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:prop type:second.Base visibility:private [final]' type=second.Base origin=null
|
||||
receiver: GET_VAR '<this>: second.MyClass declared in second.MyClass.<get-prop>' type=second.MyClass origin=null
|
||||
CLASS INTERFACE name:Base modality:ABSTRACT visibility:public superTypes:[kotlin.Any]
|
||||
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:second.MyClass.Base
|
||||
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
|
||||
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 second.Base
|
||||
$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 second.Base
|
||||
$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 second.Base
|
||||
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
|
||||
FUN FAKE_OVERRIDE name:foo visibility:public modality:OPEN <> ($this:second.Base) returnType:kotlin.String [fake_override]
|
||||
overridden:
|
||||
public open fun foo (): kotlin.String declared in second.Base
|
||||
$this: VALUE_PARAMETER name:<this> type:second.Base
|
||||
@@ -0,0 +1,108 @@
|
||||
FILE fqName:second fileName:/nestedNameClash2.kt
|
||||
FUN name:box visibility:public modality:FINAL <> () returnType:kotlin.String
|
||||
BLOCK_BODY
|
||||
VAR name:data type:second.MyClass [val]
|
||||
CONSTRUCTOR_CALL 'public constructor <init> (prop: second.Base) declared in second.MyClass' type=second.MyClass origin=null
|
||||
prop: BLOCK type=second.box.<no name provided> origin=OBJECT_LITERAL
|
||||
CLASS CLASS name:<no name provided> modality:FINAL visibility:local superTypes:[second.Base]
|
||||
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:second.box.<no name provided>
|
||||
CONSTRUCTOR visibility:public <> () returnType:second.box.<no name provided> [primary]
|
||||
BLOCK_BODY
|
||||
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () declared in kotlin.Any'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:<no name provided> modality:FINAL visibility:local superTypes:[second.Base]'
|
||||
FUN FAKE_OVERRIDE name:foo visibility:public modality:OPEN <> ($this:second.Base) returnType:kotlin.String [fake_override]
|
||||
overridden:
|
||||
public open fun foo (): kotlin.String declared in second.Base
|
||||
$this: VALUE_PARAMETER name:<this> type:second.Base
|
||||
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 second.Base
|
||||
$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 second.Base
|
||||
$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 second.Base
|
||||
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
|
||||
CONSTRUCTOR_CALL 'public constructor <init> () declared in second.box.<no name provided>' type=second.box.<no name provided> origin=OBJECT_LITERAL
|
||||
RETURN type=kotlin.Nothing from='public final fun box (): kotlin.String declared in second'
|
||||
CALL 'public open fun foo (): kotlin.String declared in second.MyClass' type=kotlin.String origin=null
|
||||
$this: GET_VAR 'val data: second.MyClass declared in second.box' type=second.MyClass origin=null
|
||||
CLASS INTERFACE name:Base modality:ABSTRACT visibility:public superTypes:[kotlin.Any]
|
||||
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:second.Base
|
||||
FUN name:foo visibility:public modality:OPEN <> ($this:second.Base) returnType:kotlin.String
|
||||
$this: VALUE_PARAMETER name:<this> type:second.Base
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public open fun foo (): kotlin.String declared in second.Base'
|
||||
CONST String type=kotlin.String value="OK"
|
||||
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
|
||||
CLASS CLASS name:MyClass modality:FINAL visibility:public superTypes:[second.Base]
|
||||
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:second.MyClass
|
||||
CONSTRUCTOR visibility:public <> (prop:second.Base) returnType:second.MyClass [primary]
|
||||
VALUE_PARAMETER name:prop index:0 type:second.Base
|
||||
BLOCK_BODY
|
||||
DELEGATING_CONSTRUCTOR_CALL 'public constructor <init> () declared in kotlin.Any'
|
||||
INSTANCE_INITIALIZER_CALL classDescriptor='CLASS CLASS name:MyClass modality:FINAL visibility:public superTypes:[second.Base]'
|
||||
PROPERTY name:prop visibility:public modality:FINAL [val]
|
||||
FIELD PROPERTY_BACKING_FIELD name:prop type:second.Base visibility:private [final]
|
||||
EXPRESSION_BODY
|
||||
GET_VAR 'prop: second.Base declared in second.MyClass.<init>' type=second.Base origin=INITIALIZE_PROPERTY_FROM_PARAMETER
|
||||
FUN DEFAULT_PROPERTY_ACCESSOR name:<get-prop> visibility:public modality:FINAL <> ($this:second.MyClass) returnType:second.Base
|
||||
correspondingProperty: PROPERTY name:prop visibility:public modality:FINAL [val]
|
||||
$this: VALUE_PARAMETER name:<this> type:second.MyClass
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun <get-prop> (): second.Base declared in second.MyClass'
|
||||
GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:prop type:second.Base visibility:private [final]' type=second.Base origin=null
|
||||
receiver: GET_VAR '<this>: second.MyClass declared in second.MyClass.<get-prop>' type=second.MyClass origin=null
|
||||
FUN DELEGATED_MEMBER name:foo visibility:public modality:OPEN <> ($this:second.MyClass) returnType:kotlin.String
|
||||
overridden:
|
||||
public open fun foo (): kotlin.String declared in second.Base
|
||||
$this: VALUE_PARAMETER name:<this> type:second.MyClass
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public open fun foo (): kotlin.String declared in second.MyClass'
|
||||
CALL 'public open fun foo (): kotlin.String declared in second.Base' type=kotlin.String origin=null
|
||||
$this: GET_FIELD 'FIELD PROPERTY_BACKING_FIELD name:prop type:second.Base visibility:private [final]' type=second.Base origin=null
|
||||
receiver: GET_VAR '<this>: second.MyClass declared in second.MyClass.foo' type=second.MyClass origin=null
|
||||
CLASS INTERFACE name:Base modality:ABSTRACT visibility:public superTypes:[kotlin.Any]
|
||||
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:second.MyClass.Base
|
||||
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
|
||||
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 second.Base
|
||||
$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 second.Base
|
||||
$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 second.Base
|
||||
$this: VALUE_PARAMETER name:<this> type:kotlin.Any
|
||||
@@ -0,0 +1,16 @@
|
||||
// DUMP_IR
|
||||
// IGNORE_CODEGEN_WITH_IR_FAKE_OVERRIDE_GENERATION
|
||||
package second
|
||||
|
||||
fun box(): String {
|
||||
val data = MyClass(object : Base {})
|
||||
return data.foo()
|
||||
}
|
||||
|
||||
interface Base {
|
||||
fun foo(): String = "OK"
|
||||
}
|
||||
|
||||
class MyClass(val prop: second.Base): Base by prop {
|
||||
interface Base
|
||||
}
|
||||
+38
@@ -0,0 +1,38 @@
|
||||
FILE: propertyTypeCollision.kt
|
||||
package one.two
|
||||
|
||||
public final fun main(): R|kotlin/Unit| {
|
||||
lval value: R|one/two/MyDataClass.MyClass| = R|one/two/MyDataClass.MyClass.MyClass|()
|
||||
lval data: R|one/two/MyDataClass| = R|one/two/MyDataClass.MyDataClass|(R|<local>/value|)
|
||||
lval copy: R|one/two/MyDataClass| = R|<local>/data|.R|one/two/MyDataClass.copy|(R|<local>/value|)
|
||||
lval prop: R|one/two/MyDataClass.MyClass| = R|<local>/data|.R|one/two/MyDataClass.prop|
|
||||
lval component1: R|one/two/MyDataClass.MyClass| = R|<local>/data|.R|one/two/MyDataClass.component1|()
|
||||
lval <destruct>: R|one/two/MyDataClass| = R|<local>/data|
|
||||
lval destructuring: R|one/two/MyDataClass.MyClass| = R|<local>/<destruct>|.R|one/two/MyDataClass.component1|()
|
||||
}
|
||||
public final class MyClass : R|kotlin/Any| {
|
||||
public constructor(): R|one/two/MyClass| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
}
|
||||
public final data class MyDataClass : R|kotlin/Any| {
|
||||
public constructor(prop: R|one/two/MyDataClass.MyClass|): R|one/two/MyDataClass| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
public final val prop: R|one/two/MyDataClass.MyClass| = R|<local>/prop|
|
||||
public get(): R|one/two/MyDataClass.MyClass|
|
||||
|
||||
public final class MyClass : R|kotlin/Any| {
|
||||
public constructor(): R|one/two/MyDataClass.MyClass| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public final operator fun component1(): R|one/two/MyDataClass.MyClass|
|
||||
|
||||
public final fun copy(prop: R|one/two/MyDataClass.MyClass| = this@R|one/two/MyDataClass|.R|one/two/MyDataClass.prop|): R|one/two/MyDataClass|
|
||||
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
// FIR_IDENTICAL
|
||||
// FIR_DUMP
|
||||
package one.two
|
||||
|
||||
import one.two.MyDataClass.MyClass as Alias
|
||||
|
||||
fun main() {
|
||||
val value = Alias()
|
||||
val data = MyDataClass(value)
|
||||
val copy = data.copy(value)
|
||||
val prop: Alias = data.prop
|
||||
val component1: Alias = data.component1()
|
||||
val (destructuring: Alias) = (data)
|
||||
}
|
||||
|
||||
class MyClass
|
||||
|
||||
data class MyDataClass(val prop: MyClass) {
|
||||
class MyClass
|
||||
}
|
||||
Vendored
+59
@@ -0,0 +1,59 @@
|
||||
FILE: propertyTypeCollisionAndAnnotations.kt
|
||||
package one.two
|
||||
|
||||
@R|kotlin/annotation/Target|(allowedTargets = vararg(Q|kotlin/annotation/AnnotationTarget|.R|kotlin/annotation/AnnotationTarget.TYPE|)) public final annotation class Anno : R|kotlin/Annotation| {
|
||||
public constructor(i: R|kotlin/Int|): R|one/two/Anno| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
public final val i: R|kotlin/Int| = R|<local>/i|
|
||||
public get(): R|kotlin/Int|
|
||||
|
||||
}
|
||||
public final fun main(): R|kotlin/Unit| {
|
||||
lval value: R|one/two/MyDataClass.MyClass<one/two/MyDataClass.MyClass<kotlin/Int>>| = R|one/two/MyDataClass.MyClass.MyClass|<R|one/two/MyDataClass.MyClass<kotlin/Int>|>()
|
||||
lval data: R|one/two/MyDataClass| = R|one/two/MyDataClass.MyDataClass|(R|<local>/value|)
|
||||
lval copy: R|one/two/MyDataClass| = R|<local>/data|.R|one/two/MyDataClass.copy|(R|<local>/value|)
|
||||
lval prop: R|one/two/MyDataClass.MyClass<one/two/MyDataClass.MyClass<kotlin/Int>>| = R|<local>/data|.R|one/two/MyDataClass.prop|
|
||||
lval component1: R|one/two/MyDataClass.MyClass<one/two/MyDataClass.MyClass<kotlin/Int>>| = R|<local>/data|.R|one/two/MyDataClass.component1|()
|
||||
lval <destruct>: R|one/two/MyDataClass| = R|<local>/data|
|
||||
lval destructuring: R|one/two/MyDataClass.MyClass<one/two/MyDataClass.MyClass<kotlin/Int>>| = R|<local>/<destruct>|.R|one/two/MyDataClass.component1|()
|
||||
}
|
||||
public final const val constant: R|kotlin/String| = String()
|
||||
public get(): R|kotlin/String|
|
||||
public final class MyClass<A> : R|kotlin/Any| {
|
||||
public constructor<A>(): R|one/two/MyClass<A>| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
}
|
||||
public final data class MyDataClass : R|kotlin/Any| {
|
||||
public constructor(prop: R|@R|one/two/Anno|(i = Int(0).R|kotlin/Int.plus|(this@R|one/two/MyDataClass.Companion|.R|one/two/MyDataClass.Companion.constant|)) one/two/MyDataClass.MyClass<@R|one/two/Anno|(i = Int(1).R|kotlin/Int.plus|(this@R|one/two/MyDataClass.Companion|.R|one/two/MyDataClass.Companion.constant|)) one/two/MyDataClass.MyClass<@R|one/two/Anno|(i = Int(2).R|kotlin/Int.plus|(this@R|one/two/MyDataClass.Companion|.R|one/two/MyDataClass.Companion.constant|)) kotlin/Int>>|): R|one/two/MyDataClass| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
public final val prop: R|@R|one/two/Anno|(i = Int(0).R|kotlin/Int.plus|(this@R|one/two/MyDataClass.Companion|.R|one/two/MyDataClass.Companion.constant|)) one/two/MyDataClass.MyClass<@R|one/two/Anno|(i = Int(1).R|kotlin/Int.plus|(this@R|one/two/MyDataClass.Companion|.R|one/two/MyDataClass.Companion.constant|)) one/two/MyDataClass.MyClass<@R|one/two/Anno|(i = Int(2).R|kotlin/Int.plus|(this@R|one/two/MyDataClass.Companion|.R|one/two/MyDataClass.Companion.constant|)) kotlin/Int>>| = R|<local>/prop|
|
||||
public get(): R|@R|one/two/Anno|(i = Int(0).R|kotlin/Int.plus|(this@R|one/two/MyDataClass.Companion|.R|one/two/MyDataClass.Companion.constant|)) one/two/MyDataClass.MyClass<@R|one/two/Anno|(i = Int(1).R|kotlin/Int.plus|(this@R|one/two/MyDataClass.Companion|.R|one/two/MyDataClass.Companion.constant|)) one/two/MyDataClass.MyClass<@R|one/two/Anno|(i = Int(2).R|kotlin/Int.plus|(this@R|one/two/MyDataClass.Companion|.R|one/two/MyDataClass.Companion.constant|)) kotlin/Int>>|
|
||||
|
||||
public final class MyClass<B> : R|kotlin/Any| {
|
||||
public constructor<B>(): R|one/two/MyDataClass.MyClass<B>| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public final companion object Companion : R|kotlin/Any| {
|
||||
private constructor(): R|one/two/MyDataClass.Companion| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
public final const val constant: R|kotlin/Int| = Int(0)
|
||||
public get(): R|kotlin/Int|
|
||||
|
||||
}
|
||||
|
||||
public final operator fun component1(): R|@R|one/two/Anno|(i = Int(0).R|kotlin/Int.plus|(this@R|one/two/MyDataClass.Companion|.R|one/two/MyDataClass.Companion.constant|)) one/two/MyDataClass.MyClass<@R|one/two/Anno|(i = Int(1).R|kotlin/Int.plus|(this@R|one/two/MyDataClass.Companion|.R|one/two/MyDataClass.Companion.constant|)) one/two/MyDataClass.MyClass<@R|one/two/Anno|(i = Int(2).R|kotlin/Int.plus|(this@R|one/two/MyDataClass.Companion|.R|one/two/MyDataClass.Companion.constant|)) kotlin/Int>>|
|
||||
|
||||
public final fun copy(prop: R|@R|one/two/Anno|(i = Int(0).R|kotlin/Int.plus|(this@R|one/two/MyDataClass.Companion|.R|one/two/MyDataClass.Companion.constant|)) one/two/MyDataClass.MyClass<@R|one/two/Anno|(i = Int(1).R|kotlin/Int.plus|(this@R|one/two/MyDataClass.Companion|.R|one/two/MyDataClass.Companion.constant|)) one/two/MyDataClass.MyClass<@R|one/two/Anno|(i = Int(2).R|kotlin/Int.plus|(this@R|one/two/MyDataClass.Companion|.R|one/two/MyDataClass.Companion.constant|)) kotlin/Int>>| = this@R|one/two/MyDataClass|.R|one/two/MyDataClass.prop|): R|one/two/MyDataClass|
|
||||
|
||||
}
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
// FIR_IDENTICAL
|
||||
// FIR_DUMP
|
||||
package one.two
|
||||
|
||||
import one.two.MyDataClass.MyClass as Alias
|
||||
|
||||
@Target(AnnotationTarget.TYPE)
|
||||
annotation class Anno(val i: Int)
|
||||
|
||||
fun main() {
|
||||
val value = Alias<Alias<Int>>()
|
||||
val data = MyDataClass(value)
|
||||
val copy = data.copy(value)
|
||||
val prop: Alias<Alias<Int>> = data.prop
|
||||
val component1: Alias<Alias<Int>> = data.component1()
|
||||
val (destructuring: Alias<Alias<Int>>) = (data)
|
||||
}
|
||||
|
||||
const val constant = ""
|
||||
|
||||
class MyClass<A>
|
||||
|
||||
data class MyDataClass(val prop: @Anno(0 + constant) MyClass<@Anno(1 + constant) MyClass<@Anno(2 + constant) Int>>) {
|
||||
class MyClass<B>
|
||||
companion object {
|
||||
const val constant = 0
|
||||
}
|
||||
}
|
||||
Vendored
+43
@@ -0,0 +1,43 @@
|
||||
FILE: delegateFieldWithAnnotationClash.kt
|
||||
package second
|
||||
|
||||
@R|kotlin/annotation/Target|(allowedTargets = vararg(Q|kotlin/annotation/AnnotationTarget|.R|kotlin/annotation/AnnotationTarget.TYPE|)) public final annotation class Anno : R|kotlin/Annotation| {
|
||||
public constructor(int: R|kotlin/Int|): R|second/Anno| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
public final val int: R|kotlin/Int| = R|<local>/int|
|
||||
public get(): R|kotlin/Int|
|
||||
|
||||
}
|
||||
public abstract interface Base : R|kotlin/Any| {
|
||||
}
|
||||
public final fun bar(): R|second/Base| {
|
||||
^bar object : R|second/Base| {
|
||||
private constructor(): R|second/<anonymous>| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
public final const val constant: R|kotlin/Int| = Int(0)
|
||||
public get(): R|kotlin/Int|
|
||||
public final class MyClass : R|@R|second/Anno|(int = R|second/constant|) second/Base| {
|
||||
public constructor(): R|second/MyClass| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
private final field $$delegate_0: R|@R|second/Anno|(int = R|second/constant|) second/Base| = R|second/bar|()
|
||||
|
||||
@R|kotlin/annotation/Target|(allowedTargets = vararg(Q|kotlin/annotation/AnnotationTarget|.R|kotlin/annotation/AnnotationTarget.TYPE|)) public final annotation class Anno : R|kotlin/Annotation| {
|
||||
public constructor(string: R|kotlin/String|): R|second/MyClass.Anno| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
public final val string: R|kotlin/String| = R|<local>/string|
|
||||
public get(): R|kotlin/String|
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
// FIR_IDENTICAL
|
||||
// FIR_DUMP
|
||||
package second
|
||||
|
||||
@Target(AnnotationTarget.TYPE)
|
||||
annotation class Anno(val int: Int)
|
||||
|
||||
interface Base
|
||||
fun bar(): Base = object : Base {}
|
||||
|
||||
const val constant = 0
|
||||
|
||||
class MyClass: @Anno(constant) Base by bar() {
|
||||
@Target(AnnotationTarget.TYPE)
|
||||
annotation class Anno(val string: String)
|
||||
}
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
FILE: nestedNameClash.kt
|
||||
package second
|
||||
|
||||
public final fun main(): R|kotlin/Unit| {
|
||||
lval data: R|second/MyClass| = R|second/MyClass.MyClass|(object : R|second/Base| {
|
||||
private constructor(): R|second/<anonymous>| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
}
|
||||
)
|
||||
R|<local>/data|.R|second/Base.foo|()
|
||||
}
|
||||
public abstract interface Base : R|kotlin/Any| {
|
||||
public open fun foo(): R|kotlin/Unit| {
|
||||
}
|
||||
|
||||
}
|
||||
public final class MyClass : R|second/Base| {
|
||||
public constructor(prop: R|second/Base|): R|second/MyClass| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
private final field $$delegate_0: R|second/MyClass.Base| = R|<local>/prop|
|
||||
|
||||
public final val prop: R|second/Base| = R|<local>/prop|
|
||||
public get(): R|second/Base|
|
||||
|
||||
public abstract interface Base : R|kotlin/Any| {
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
// FIR_IDENTICAL
|
||||
// FIR_DUMP
|
||||
package second
|
||||
|
||||
fun main() {
|
||||
val data = MyClass(object : Base {})
|
||||
data.foo()
|
||||
}
|
||||
|
||||
interface Base {
|
||||
fun foo() {}
|
||||
}
|
||||
|
||||
class MyClass(val prop: second.Base): Base by prop {
|
||||
interface Base
|
||||
}
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
FILE: nestedNameClash2.kt
|
||||
package second
|
||||
|
||||
public final fun main(): R|kotlin/Unit| {
|
||||
lval data: R|second/MyClass| = R|second/MyClass.MyClass|(object : R|second/Base<second/Base<kotlin/Int>>| {
|
||||
private constructor(): R|second/<anonymous>| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
}
|
||||
)
|
||||
R|<local>/data|.R|SubstitutionOverride<second/MyClass.foo: R|kotlin/Unit|>|()
|
||||
}
|
||||
public abstract interface Base<A> : R|kotlin/Any| {
|
||||
public open fun foo(): R|kotlin/Unit| {
|
||||
}
|
||||
|
||||
}
|
||||
public final class MyClass : R|second/Base<second/Base<kotlin/Int>>| {
|
||||
public constructor(prop: R|second/Base<second/Base<kotlin/Int>>|): R|second/MyClass| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
private final field $$delegate_0: R|second/MyClass.Base<second/Base<kotlin/Int>>| = R|<local>/prop|
|
||||
|
||||
public final val prop: R|second/Base<second/Base<kotlin/Int>>| = R|<local>/prop|
|
||||
public get(): R|second/Base<second/Base<kotlin/Int>>|
|
||||
|
||||
public abstract interface Base<B> : R|kotlin/Any| {
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
// FIR_IDENTICAL
|
||||
// FIR_DUMP
|
||||
package second
|
||||
|
||||
fun main() {
|
||||
val data = MyClass(object : Base<Base<Int>> {})
|
||||
data.foo()
|
||||
}
|
||||
|
||||
interface Base<A> {
|
||||
fun foo() {}
|
||||
}
|
||||
|
||||
class MyClass(val prop: second.Base<second.Base<Int>>): Base<Base<Int>> by prop {
|
||||
interface Base<B>
|
||||
}
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
// FIR_DUMP
|
||||
package second
|
||||
|
||||
fun main() {
|
||||
val data = MyClass(object : Base<Base<Int>> {})
|
||||
data.foo()
|
||||
}
|
||||
|
||||
interface Base<A> {
|
||||
fun foo() {}
|
||||
}
|
||||
|
||||
class MyClass(val prop: second.Base<second.Base<Int>>): Base<!WRONG_NUMBER_OF_TYPE_ARGUMENTS!><Base<Int>><!> by prop {
|
||||
interface Base
|
||||
}
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
FILE: nestedNameClash3.fir.kt
|
||||
package second
|
||||
|
||||
public final fun main(): R|kotlin/Unit| {
|
||||
lval data: R|second/MyClass| = R|second/MyClass.MyClass|(object : R|second/Base<second/Base<kotlin/Int>>| {
|
||||
private constructor(): R|second/<anonymous>| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
}
|
||||
)
|
||||
R|<local>/data|.R|SubstitutionOverride<second/MyClass.foo: R|kotlin/Unit|>|()
|
||||
}
|
||||
public abstract interface Base<A> : R|kotlin/Any| {
|
||||
public open fun foo(): R|kotlin/Unit| {
|
||||
}
|
||||
|
||||
}
|
||||
public final class MyClass : R|second/Base<second/Base<kotlin/Int>>| {
|
||||
public constructor(prop: R|second/Base<second/Base<kotlin/Int>>|): R|second/MyClass| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
private final field $$delegate_0: <ERROR TYPE REF: Wrong number of type arguments> = R|<local>/prop|
|
||||
|
||||
public final val prop: R|second/Base<second/Base<kotlin/Int>>| = R|<local>/prop|
|
||||
public get(): R|second/Base<second/Base<kotlin/Int>>|
|
||||
|
||||
public abstract interface Base : R|kotlin/Any| {
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
// FIR_DUMP
|
||||
package second
|
||||
|
||||
fun main() {
|
||||
val data = MyClass(object : Base<Base<Int>> {})
|
||||
data.foo()
|
||||
}
|
||||
|
||||
interface Base<A> {
|
||||
fun foo() {}
|
||||
}
|
||||
|
||||
class MyClass(val prop: second.Base<second.Base<Int>>): Base<Base<Int>> by prop {
|
||||
interface Base
|
||||
}
|
||||
Vendored
+48
@@ -0,0 +1,48 @@
|
||||
FILE: nestedNameClashAndAnnotations.kt
|
||||
package second
|
||||
|
||||
@R|kotlin/annotation/Target|(allowedTargets = vararg(Q|kotlin/annotation/AnnotationTarget|.R|kotlin/annotation/AnnotationTarget.TYPE|)) public final annotation class Anno : R|kotlin/Annotation| {
|
||||
public constructor(i: R|kotlin/Int|): R|second/Anno| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
public final val i: R|kotlin/Int| = R|<local>/i|
|
||||
public get(): R|kotlin/Int|
|
||||
|
||||
}
|
||||
public abstract interface Base<A> : R|kotlin/Any| {
|
||||
public open fun foo(): R|kotlin/Unit| {
|
||||
}
|
||||
|
||||
}
|
||||
public final const val outer: R|kotlin/Int| = Int(0)
|
||||
public get(): R|kotlin/Int|
|
||||
public final const val inner: R|kotlin/String| = String()
|
||||
public get(): R|kotlin/String|
|
||||
public final class MyClass : R|@R|second/Anno|(i = Int(3).R|kotlin/Int.plus|(R|second/outer|)) second/Base<@R|second/Anno|(i = Int(4).R|kotlin/Int.plus|(R|second/outer|)) second/Base<@R|second/Anno|(i = Int(5).R|kotlin/Int.plus|(R|second/outer|)) kotlin/Int>>| {
|
||||
public constructor(prop: R|@R|second/Anno|(i = Int(0).R|kotlin/Int.plus|(this@R|second/MyClass.Companion|.R|second/MyClass.Companion.inner|)) second/Base<@R|second/Anno|(i = Int(1).R|kotlin/Int.plus|(this@R|second/MyClass.Companion|.R|second/MyClass.Companion.inner|)) second/Base<@R|second/Anno|(i = Int(2).R|kotlin/Int.plus|(this@R|second/MyClass.Companion|.R|second/MyClass.Companion.inner|)) kotlin/Int>>|): R|second/MyClass| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
private final field $$delegate_0: R|@R|second/Anno|(i = Int(3).R|kotlin/Int.plus|(R|second/outer|)) second/MyClass.Base<@R|second/Anno|(i = Int(4).R|kotlin/Int.plus|(R|second/outer|)) second/Base<@R|second/Anno|(i = Int(5).R|kotlin/Int.plus|(R|second/outer|)) kotlin/Int>>| = R|<local>/prop|
|
||||
|
||||
public final val prop: R|@R|second/Anno|(i = Int(0).R|kotlin/Int.plus|(this@R|second/MyClass.Companion|.R|second/MyClass.Companion.inner|)) second/Base<@R|second/Anno|(i = Int(1).R|kotlin/Int.plus|(this@R|second/MyClass.Companion|.R|second/MyClass.Companion.inner|)) second/Base<@R|second/Anno|(i = Int(2).R|kotlin/Int.plus|(this@R|second/MyClass.Companion|.R|second/MyClass.Companion.inner|)) kotlin/Int>>| = R|<local>/prop|
|
||||
public get(): R|@R|second/Anno|(i = Int(0).R|kotlin/Int.plus|(this@R|second/MyClass.Companion|.R|second/MyClass.Companion.inner|)) second/Base<@R|second/Anno|(i = Int(1).R|kotlin/Int.plus|(this@R|second/MyClass.Companion|.R|second/MyClass.Companion.inner|)) second/Base<@R|second/Anno|(i = Int(2).R|kotlin/Int.plus|(this@R|second/MyClass.Companion|.R|second/MyClass.Companion.inner|)) kotlin/Int>>|
|
||||
|
||||
public abstract interface Base<B> : R|kotlin/Any| {
|
||||
}
|
||||
|
||||
public final companion object Companion : R|kotlin/Any| {
|
||||
private constructor(): R|second/MyClass.Companion| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
public final const val outer: R|kotlin/String| = String()
|
||||
public get(): R|kotlin/String|
|
||||
|
||||
public final const val inner: R|kotlin/Int| = Int(0)
|
||||
public get(): R|kotlin/Int|
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
// FIR_IDENTICAL
|
||||
// FIR_DUMP
|
||||
package second
|
||||
|
||||
@Target(AnnotationTarget.TYPE)
|
||||
annotation class Anno(val i: Int)
|
||||
|
||||
interface Base<A> {
|
||||
fun foo() {}
|
||||
}
|
||||
|
||||
const val outer = 0
|
||||
const val inner = ""
|
||||
|
||||
class MyClass(val prop: @Anno(0 + inner) second.Base<@Anno(1 + inner) second.Base<@Anno(2 + inner) Int>>): @Anno(3 + outer) Base<@Anno(4 + outer) Base<@Anno(5 + outer) Int>> by prop {
|
||||
interface Base<B>
|
||||
|
||||
companion object {
|
||||
const val outer = ""
|
||||
const val inner = 0
|
||||
}
|
||||
}
|
||||
+48
@@ -0,0 +1,48 @@
|
||||
FILE: nestedNameClashAndAnnotations.reversed.kt
|
||||
package second
|
||||
|
||||
@R|kotlin/annotation/Target|(allowedTargets = vararg(Q|kotlin/annotation/AnnotationTarget|.R|kotlin/annotation/AnnotationTarget.TYPE|)) public final annotation class Anno : R|kotlin/Annotation| {
|
||||
public constructor(i: R|kotlin/Int|): R|second/Anno| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
public final val i: R|kotlin/Int| = R|<local>/i|
|
||||
public get(): R|kotlin/Int|
|
||||
|
||||
}
|
||||
public abstract interface Base<A> : R|kotlin/Any| {
|
||||
public open fun foo(): R|kotlin/Unit| {
|
||||
}
|
||||
|
||||
}
|
||||
public final const val outer: R|kotlin/Int| = Int(0)
|
||||
public get(): R|kotlin/Int|
|
||||
public final const val inner: R|kotlin/String| = String()
|
||||
public get(): R|kotlin/String|
|
||||
public final class MyClass : R|@R|second/Anno|(i = IntegerLiteral(3).<Ambiguity: plus, [kotlin/Int.plus, kotlin/Int.plus, kotlin/Int.plus, kotlin/Int.plus, kotlin/Int.plus, kotlin/Int.plus]>#(this@R|second/MyClass.Companion|.R|second/MyClass.Companion.outer|)) second/Base<@R|second/Anno|(i = IntegerLiteral(4).<Ambiguity: plus, [kotlin/Int.plus, kotlin/Int.plus, kotlin/Int.plus, kotlin/Int.plus, kotlin/Int.plus, kotlin/Int.plus]>#(this@R|second/MyClass.Companion|.R|second/MyClass.Companion.outer|)) second/Base<@R|second/Anno|(i = IntegerLiteral(5).<Ambiguity: plus, [kotlin/Int.plus, kotlin/Int.plus, kotlin/Int.plus, kotlin/Int.plus, kotlin/Int.plus, kotlin/Int.plus]>#(this@R|second/MyClass.Companion|.R|second/MyClass.Companion.outer|)) kotlin/Int>>| {
|
||||
public constructor(prop: R|@R|second/Anno|(i = Int(0).R|kotlin/Int.plus|(this@R|second/MyClass.Companion|.R|second/MyClass.Companion.inner|)) second/Base<@R|second/Anno|(i = Int(1).R|kotlin/Int.plus|(this@R|second/MyClass.Companion|.R|second/MyClass.Companion.inner|)) second/Base<@R|second/Anno|(i = Int(2).R|kotlin/Int.plus|(this@R|second/MyClass.Companion|.R|second/MyClass.Companion.inner|)) kotlin/Int>>|): R|second/MyClass| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
private final field $$delegate_0: R|@R|second/Anno|(i = IntegerLiteral(3).<Ambiguity: plus, [kotlin/Int.plus, kotlin/Int.plus, kotlin/Int.plus, kotlin/Int.plus, kotlin/Int.plus, kotlin/Int.plus]>#(this@R|second/MyClass.Companion|.R|second/MyClass.Companion.outer|)) second/MyClass.Base<@R|second/Anno|(i = IntegerLiteral(4).<Ambiguity: plus, [kotlin/Int.plus, kotlin/Int.plus, kotlin/Int.plus, kotlin/Int.plus, kotlin/Int.plus, kotlin/Int.plus]>#(this@R|second/MyClass.Companion|.R|second/MyClass.Companion.outer|)) second/Base<@R|second/Anno|(i = IntegerLiteral(5).<Ambiguity: plus, [kotlin/Int.plus, kotlin/Int.plus, kotlin/Int.plus, kotlin/Int.plus, kotlin/Int.plus, kotlin/Int.plus]>#(this@R|second/MyClass.Companion|.R|second/MyClass.Companion.outer|)) kotlin/Int>>| = R|<local>/prop|
|
||||
|
||||
public final val prop: R|@R|second/Anno|(i = Int(0).R|kotlin/Int.plus|(this@R|second/MyClass.Companion|.R|second/MyClass.Companion.inner|)) second/Base<@R|second/Anno|(i = Int(1).R|kotlin/Int.plus|(this@R|second/MyClass.Companion|.R|second/MyClass.Companion.inner|)) second/Base<@R|second/Anno|(i = Int(2).R|kotlin/Int.plus|(this@R|second/MyClass.Companion|.R|second/MyClass.Companion.inner|)) kotlin/Int>>| = R|<local>/prop|
|
||||
public get(): R|@R|second/Anno|(i = Int(0).R|kotlin/Int.plus|(this@R|second/MyClass.Companion|.R|second/MyClass.Companion.inner|)) second/Base<@R|second/Anno|(i = Int(1).R|kotlin/Int.plus|(this@R|second/MyClass.Companion|.R|second/MyClass.Companion.inner|)) second/Base<@R|second/Anno|(i = Int(2).R|kotlin/Int.plus|(this@R|second/MyClass.Companion|.R|second/MyClass.Companion.inner|)) kotlin/Int>>|
|
||||
|
||||
public abstract interface Base<B> : R|kotlin/Any| {
|
||||
}
|
||||
|
||||
public final companion object Companion : R|kotlin/Any| {
|
||||
private constructor(): R|second/MyClass.Companion| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
public final const val outer: R|kotlin/String| = String()
|
||||
public get(): R|kotlin/String|
|
||||
|
||||
public final const val inner: R|kotlin/Int| = Int(0)
|
||||
public get(): R|kotlin/Int|
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
Vendored
+22
@@ -0,0 +1,22 @@
|
||||
// FIR_IDENTICAL
|
||||
// FIR_DUMP
|
||||
package second
|
||||
|
||||
@Target(AnnotationTarget.TYPE)
|
||||
annotation class Anno(val i: Int)
|
||||
|
||||
interface Base<A> {
|
||||
fun foo() {}
|
||||
}
|
||||
|
||||
const val outer = 0
|
||||
const val inner = ""
|
||||
|
||||
class MyClass(val prop: @Anno(0 + inner) second.Base<@Anno(1 + inner) second.Base<@Anno(2 + inner) Int>>): @Anno(3 <!NONE_APPLICABLE, NONE_APPLICABLE!>+<!> outer) Base<@Anno(4 <!NONE_APPLICABLE, NONE_APPLICABLE!>+<!> outer) Base<@Anno(5 <!NONE_APPLICABLE, NONE_APPLICABLE!>+<!> outer) Int>> by prop {
|
||||
interface Base<B>
|
||||
|
||||
companion object {
|
||||
const val outer = ""
|
||||
const val inner = 0
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user