[FIR] Improve diagnostic reporting & don't use error symbol for candidate if possible
Also introduce few new diagnostics: - NONE_APPLICABLE more many inapplicable candidates - HIDDEN for visible candidates
This commit is contained in:
committed by
Mikhail Glukhikh
parent
5c0528b61e
commit
f283f2db43
+5
-5
@@ -4,7 +4,7 @@ FILE fqName:<root> fileName:/arrayAsVarargAfterSamArgument.kt
|
||||
VALUE_PARAMETER name:r index:1 type:java.lang.Runnable
|
||||
VALUE_PARAMETER name:arr index:2 type:kotlin.Array<kotlin.String>
|
||||
BLOCK_BODY
|
||||
ERROR_CALL 'Unresolved reference: <Inapplicable(INAPPLICABLE): [/Test.foo1]>#' type=IrErrorType
|
||||
ERROR_CALL 'Unresolved reference: <Inapplicable(INAPPLICABLE): /Test.foo1>#' type=kotlin.String?
|
||||
FUN_EXPR type=kotlin.Function0<kotlin.Unit> origin=LAMBDA
|
||||
FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> () returnType:kotlin.Unit
|
||||
BLOCK_BODY
|
||||
@@ -21,7 +21,7 @@ FILE fqName:<root> fileName:/arrayAsVarargAfterSamArgument.kt
|
||||
strs: VARARG type=kotlin.Array<out kotlin.String?>? varargElementType=kotlin.String?
|
||||
SPREAD_ELEMENT
|
||||
GET_VAR 'arr: kotlin.Array<kotlin.String> declared in <root>.test' type=kotlin.Array<kotlin.String> origin=null
|
||||
ERROR_CALL 'Unresolved reference: <Inapplicable(INAPPLICABLE): [/Test.foo1]>#' type=IrErrorType
|
||||
ERROR_CALL 'Unresolved reference: <Inapplicable(INAPPLICABLE): /Test.foo1>#' type=kotlin.String?
|
||||
GET_VAR 'fn: kotlin.Function0<kotlin.Unit> declared in <root>.test' type=kotlin.Function0<kotlin.Unit> origin=null
|
||||
GET_VAR 'arr: kotlin.Array<kotlin.String> declared in <root>.test' type=kotlin.Array<kotlin.String> origin=null
|
||||
CALL 'public open fun foo1 (r: java.lang.Runnable?, vararg strs: kotlin.String?): kotlin.String? declared in <root>.Test' type=kotlin.String? origin=null
|
||||
@@ -34,7 +34,7 @@ FILE fqName:<root> fileName:/arrayAsVarargAfterSamArgument.kt
|
||||
r: GET_VAR 'r: java.lang.Runnable declared in <root>.test' type=java.lang.Runnable origin=null
|
||||
strs: VARARG type=kotlin.Array<out kotlin.String?>? varargElementType=kotlin.String?
|
||||
CONST String type=kotlin.String value=""
|
||||
ERROR_CALL 'Unresolved reference: <Inapplicable(INAPPLICABLE): [/Test.foo1]>#' type=IrErrorType
|
||||
ERROR_CALL 'Unresolved reference: <Inapplicable(INAPPLICABLE): /Test.foo1>#' type=kotlin.String?
|
||||
GET_VAR 'fn: kotlin.Function0<kotlin.Unit> declared in <root>.test' type=kotlin.Function0<kotlin.Unit> origin=null
|
||||
GET_VAR 'arr: kotlin.Array<kotlin.String> declared in <root>.test' type=kotlin.Array<kotlin.String> origin=null
|
||||
CALL 'public open fun foo1 (r: java.lang.Runnable?, vararg strs: kotlin.String?): kotlin.String? declared in <root>.Test' type=kotlin.String? origin=null
|
||||
@@ -49,7 +49,7 @@ FILE fqName:<root> fileName:/arrayAsVarargAfterSamArgument.kt
|
||||
SPREAD_ELEMENT
|
||||
GET_VAR 'arr: kotlin.Array<kotlin.String> declared in <root>.test' type=kotlin.Array<kotlin.String> origin=null
|
||||
VAR name:i1 type:IrErrorType [val]
|
||||
ERROR_CALL 'Unresolved reference: <Inapplicable(INAPPLICABLE): [/Test.Test, /Test.Test]>#' type=IrErrorType
|
||||
ERROR_CALL 'Unresolved reference: <Ambiguity: Test, [/Test.Test, /Test.Test]>#' type=IrErrorType
|
||||
FUN_EXPR type=kotlin.Function0<kotlin.Unit> origin=LAMBDA
|
||||
FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> () returnType:kotlin.Unit
|
||||
BLOCK_BODY
|
||||
@@ -68,7 +68,7 @@ FILE fqName:<root> fileName:/arrayAsVarargAfterSamArgument.kt
|
||||
SPREAD_ELEMENT
|
||||
GET_VAR 'arr: kotlin.Array<kotlin.String> declared in <root>.test' type=kotlin.Array<kotlin.String> origin=null
|
||||
VAR name:i3 type:IrErrorType [val]
|
||||
ERROR_CALL 'Unresolved reference: <Inapplicable(INAPPLICABLE): [/Test.Test, /Test.Test]>#' type=IrErrorType
|
||||
ERROR_CALL 'Unresolved reference: <Ambiguity: Test, [/Test.Test, /Test.Test]>#' type=IrErrorType
|
||||
FUN_EXPR type=kotlin.Function0<kotlin.Unit> origin=LAMBDA
|
||||
FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> () returnType:kotlin.Unit
|
||||
BLOCK_BODY
|
||||
|
||||
+1
-1
@@ -37,4 +37,4 @@ public class Test {
|
||||
}
|
||||
public Test(Runnable r, String... strs) {}
|
||||
public Test(Runnable r1, Runnable r2, String... strs) {}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
FILE fqName:<root> fileName:/samByProjectedType.kt
|
||||
FUN name:test1 visibility:public modality:FINAL <> () returnType:kotlin.Unit
|
||||
BLOCK_BODY
|
||||
ERROR_CALL 'Unresolved reference: <Inapplicable(INAPPLICABLE): [/H.bar]>#' type=IrErrorType
|
||||
FUN_EXPR type=kotlin.Function1<kotlin.Any, kotlin.Any> origin=LAMBDA
|
||||
FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> (x:kotlin.Any) returnType:kotlin.Any
|
||||
ERROR_CALL 'Unresolved reference: <Inapplicable(INAPPLICABLE): /H.bar>#' type=kotlin.Unit
|
||||
FUN_EXPR type=kotlin.Function1<kotlin.Any, kotlin.Any?> origin=LAMBDA
|
||||
FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> (x:kotlin.Any) returnType:kotlin.Any?
|
||||
VALUE_PARAMETER name:x index:0 type:kotlin.Any
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='local final fun <anonymous> (x: kotlin.Any): kotlin.Any declared in <root>.test1'
|
||||
RETURN type=kotlin.Nothing from='local final fun <anonymous> (x: kotlin.Any): kotlin.Any? declared in <root>.test1'
|
||||
GET_VAR 'x: kotlin.Any declared in <root>.test1.<anonymous>' type=kotlin.Any origin=null
|
||||
|
||||
+2
-2
@@ -88,13 +88,13 @@ FILE fqName:<root> fileName:/samConversionsWithSmartCasts.kt
|
||||
BLOCK_BODY
|
||||
TYPE_OP type=kotlin.Function0<kotlin.Unit> origin=CAST typeOperand=kotlin.Function0<kotlin.Unit>
|
||||
GET_VAR 'a: kotlin.Function1<kotlin.Int, kotlin.Int> declared in <root>.test7' type=kotlin.Function1<kotlin.Int, kotlin.Int> origin=null
|
||||
ERROR_CALL 'Unresolved reference: <Inapplicable(INAPPLICABLE): [/J.run1]>#' type=IrErrorType
|
||||
ERROR_CALL 'Unresolved reference: <Inapplicable(INAPPLICABLE): /J.run1>#' type=kotlin.Unit
|
||||
TYPE_OP type=kotlin.Function0<kotlin.Unit> origin=IMPLICIT_CAST typeOperand=kotlin.Function0<kotlin.Unit>
|
||||
GET_VAR 'a: kotlin.Function1<kotlin.Int, kotlin.Int> declared in <root>.test7' type=kotlin.Function1<kotlin.Int, kotlin.Int> origin=null
|
||||
FUN name:test8 visibility:public modality:FINAL <> (a:kotlin.Function0<kotlin.Unit>) returnType:kotlin.Unit
|
||||
VALUE_PARAMETER name:a index:0 type:kotlin.Function0<kotlin.Unit>
|
||||
BLOCK_BODY
|
||||
ERROR_CALL 'Unresolved reference: <Inapplicable(INAPPLICABLE): [/J.run1]>#' type=IrErrorType
|
||||
ERROR_CALL 'Unresolved reference: <Inapplicable(INAPPLICABLE): /J.run1>#' type=kotlin.Unit
|
||||
CALL 'public open fun id <T> (x: T of <root>.J.id?): T of <root>.J.id? declared in <root>.J' type=kotlin.Function0<kotlin.Unit>? origin=null
|
||||
<T>: kotlin.Function0<kotlin.Unit>?
|
||||
x: GET_VAR 'a: kotlin.Function0<kotlin.Unit> declared in <root>.test8' type=kotlin.Function0<kotlin.Unit> origin=null
|
||||
|
||||
Reference in New Issue
Block a user