FIR declared member scope: remove constructors from callable index
This removes constructor resolve ambiguity in some cases. Now constructors are resolved only via classifiers
This commit is contained in:
+4
-3
@@ -4,10 +4,11 @@ FILE fqName:<root> fileName:/constructorWithOwnTypeParametersCall.kt
|
||||
RETURN type=kotlin.Nothing from='public final fun testKotlin (): <root>.K1.K2<kotlin.String> declared in <root>'
|
||||
CONSTRUCTOR_CALL 'public constructor <init> () [primary] declared in <root>.K1.K2' type=<root>.K1.K2<kotlin.String> origin=null
|
||||
<class: T2>: <none>
|
||||
FUN name:testJava visibility:public modality:FINAL <> () returnType:IrErrorType
|
||||
FUN name:testJava visibility:public modality:FINAL <> () returnType:<root>.J1.J2<kotlin.Double>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun testJava (): IrErrorType declared in <root>'
|
||||
ERROR_CALL 'Unresolved reference: <Unresolved name: J2>#' type=IrErrorType
|
||||
RETURN type=kotlin.Nothing from='public final fun testJava (): <root>.J1.J2<kotlin.Double> declared in <root>'
|
||||
CONSTRUCTOR_CALL 'public constructor <init> () declared in <root>.J1.J2' type=<root>.J1.J2<kotlin.Double> origin=null
|
||||
<class: X2>: <none>
|
||||
CLASS CLASS name:K1 modality:FINAL visibility:public superTypes:[kotlin.Any]
|
||||
$this: VALUE_PARAMETER INSTANCE_RECEIVER name:<this> type:<root>.K1
|
||||
TYPE_PARAMETER name:T1 index:0 variance: superTypes:[]
|
||||
|
||||
+9
-7
@@ -10,14 +10,16 @@ FILE fqName:<root> fileName:/javaConstructorWithTypeParameters.kt
|
||||
CONSTRUCTOR_CALL 'public constructor <init> (x1: X1 of <uninitialized parent>?) declared in <root>.J1' type=<root>.J1<kotlin.Int> origin=null
|
||||
<class: T1>: <none>
|
||||
x1: CONST Int type=kotlin.Int value=1
|
||||
FUN name:test3 visibility:public modality:FINAL <> (j1:<root>.J1<kotlin.Any>) returnType:IrErrorType
|
||||
FUN name:test3 visibility:public modality:FINAL <> (j1:<root>.J1<kotlin.Any>) returnType:<root>.J1.J2<kotlin.Int>
|
||||
VALUE_PARAMETER name:j1 index:0 type:<root>.J1<kotlin.Any>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun test3 (j1: <root>.J1<kotlin.Any>): IrErrorType declared in <root>'
|
||||
ERROR_CALL 'Unresolved reference: <Unresolved name: J2>#' type=IrErrorType
|
||||
FUN name:test4 visibility:public modality:FINAL <> (j1:<root>.J1<kotlin.Any>) returnType:IrErrorType
|
||||
RETURN type=kotlin.Nothing from='public final fun test3 (j1: <root>.J1<kotlin.Any>): <root>.J1.J2<kotlin.Int> declared in <root>'
|
||||
CONSTRUCTOR_CALL 'public constructor <init> () declared in <root>.J1.J2' type=<root>.J1.J2<kotlin.Int> origin=null
|
||||
<class: T2>: <none>
|
||||
FUN name:test4 visibility:public modality:FINAL <> (j1:<root>.J1<kotlin.Any>) returnType:<root>.J1.J2<kotlin.Int>
|
||||
VALUE_PARAMETER name:j1 index:0 type:<root>.J1<kotlin.Any>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun test4 (j1: <root>.J1<kotlin.Any>): IrErrorType declared in <root>'
|
||||
ERROR_CALL 'Unresolved reference: <Unresolved name: J2>#' type=IrErrorType
|
||||
CONST Int type=kotlin.Int value=1
|
||||
RETURN type=kotlin.Nothing from='public final fun test4 (j1: <root>.J1<kotlin.Any>): <root>.J1.J2<kotlin.Int> declared in <root>'
|
||||
CONSTRUCTOR_CALL 'public constructor <init> (x2: X2 of <uninitialized parent>?) declared in <root>.J1.J2' type=<root>.J1.J2<kotlin.Int> origin=null
|
||||
<class: T2>: <none>
|
||||
x2: CONST Int type=kotlin.Int value=1
|
||||
|
||||
Reference in New Issue
Block a user