[FIR] Create error candidate for completion instead of simple error reference
This commit is contained in:
+1
-1
@@ -2,7 +2,7 @@
|
||||
fun foo() {
|
||||
fun bar1() = bar1()
|
||||
|
||||
fun bar2() = 1 + bar2()
|
||||
fun bar2() = 1 <!AMBIGUITY!>+<!> bar2()
|
||||
fun bar3() = <!INAPPLICABLE_CANDIDATE!>id<!>(bar3())
|
||||
}
|
||||
|
||||
|
||||
@@ -3,6 +3,6 @@
|
||||
// See EA-76890 / KT-10843: NPE during analysis
|
||||
fun lambda(x : Int?) = x?.<!UNRESOLVED_REFERENCE!>let<!> <!UNRESOLVED_REFERENCE!>l<!> {
|
||||
y ->
|
||||
if (y > 0) return@l x
|
||||
if (y <!UNRESOLVED_REFERENCE!>><!> 0) return@l x
|
||||
y
|
||||
}!!
|
||||
|
||||
Vendored
+1
-1
@@ -52,4 +52,4 @@ FILE fqName:<root> fileName:/adaptedExtensionFunctions.kt
|
||||
FUN name:testExtensionBoth visibility:public modality:FINAL <> () returnType:kotlin.Unit
|
||||
BLOCK_BODY
|
||||
ERROR_CALL 'Unresolved reference: <Inapplicable(INAPPLICABLE): [/use]>#' type=IrErrorType
|
||||
FUNCTION_REFERENCE 'public final fun extensionBoth (i: kotlin.Int, s: kotlin.String, vararg t: kotlin.String): kotlin.Unit declared in <root>' type=kotlin.reflect.KFunction3<<root>.C, kotlin.Int, kotlin.Array<out kotlin.String>, kotlin.Unit> origin=null reflectionTarget=<same>
|
||||
FUNCTION_REFERENCE 'public final fun extensionBoth (i: kotlin.Int, s: kotlin.String, vararg t: kotlin.String): kotlin.Unit declared in <root>' type=kotlin.reflect.KFunction4<<root>.C, kotlin.Int, kotlin.String, kotlin.Array<out kotlin.String>, kotlin.Unit> origin=null reflectionTarget=<same>
|
||||
|
||||
Vendored
+1
-1
@@ -14,5 +14,5 @@ FILE fqName:test fileName:/boundInlineAdaptedReference.kt
|
||||
FUN name:test visibility:public modality:FINAL <> () returnType:kotlin.Unit
|
||||
BLOCK_BODY
|
||||
ERROR_CALL 'Unresolved reference: <Inapplicable(INAPPLICABLE): [test/foo]>#' type=IrErrorType
|
||||
FUNCTION_REFERENCE 'public final fun id (s: kotlin.String, vararg xs: kotlin.Int): kotlin.String declared in test' type=kotlin.reflect.KFunction1<kotlin.IntArray, kotlin.String> origin=null reflectionTarget=<same>
|
||||
FUNCTION_REFERENCE 'public final fun id (s: kotlin.String, vararg xs: kotlin.Int): kotlin.String declared in test' type=kotlin.reflect.KFunction2<kotlin.String, kotlin.IntArray, kotlin.String> origin=null reflectionTarget=<same>
|
||||
$receiver: CONST String type=kotlin.String value="Fail"
|
||||
|
||||
+1
-1
@@ -80,7 +80,7 @@ FILE fqName:<root> fileName:/suspendConversion.kt
|
||||
FUN name:testWithDefaults visibility:public modality:FINAL <> () returnType:kotlin.Unit
|
||||
BLOCK_BODY
|
||||
ERROR_CALL 'Unresolved reference: <Inapplicable(INAPPLICABLE): [/useSuspend]>#' type=IrErrorType
|
||||
FUNCTION_REFERENCE 'public final fun foo4 (i: kotlin.Int): kotlin.Unit declared in <root>' type=kotlin.reflect.KFunction0<kotlin.Unit> origin=null reflectionTarget=<same>
|
||||
FUNCTION_REFERENCE 'public final fun foo4 (i: kotlin.Int): kotlin.Unit declared in <root>' type=kotlin.reflect.KFunction1<kotlin.Int, kotlin.Unit> origin=null reflectionTarget=<same>
|
||||
FUN name:testWithBoundReceiver visibility:public modality:FINAL <> () returnType:kotlin.Unit
|
||||
BLOCK_BODY
|
||||
ERROR_CALL 'Unresolved reference: <Inapplicable(INAPPLICABLE): [/useSuspend]>#' type=IrErrorType
|
||||
|
||||
+5
-5
@@ -5,10 +5,10 @@ FILE fqName:<root> fileName:/typeParametersInImplicitCast.kt
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='public final fun problematic <T> (lss: kotlin.collections.List<kotlin.collections.List<T of <root>.problematic>>): kotlin.collections.List<T of <root>.problematic> declared in <root>'
|
||||
ERROR_CALL 'Unresolved reference: <Ambiguity: flatMap, [kotlin/collections/flatMap, kotlin/collections/flatMap]>#' type=IrErrorType
|
||||
FUN_EXPR type=kotlin.Function0<kotlin.collections.List<kotlin.Nothing?>> origin=LAMBDA
|
||||
FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> () returnType:kotlin.collections.List<kotlin.Nothing?>
|
||||
FUN_EXPR type=kotlin.Function0<kotlin.collections.List<kotlin.Any?>> origin=LAMBDA
|
||||
FUN LOCAL_FUNCTION_FOR_LAMBDA name:<anonymous> visibility:local modality:FINAL <> () returnType:kotlin.collections.List<kotlin.Any?>
|
||||
BLOCK_BODY
|
||||
RETURN type=kotlin.Nothing from='local final fun <anonymous> (): kotlin.collections.List<kotlin.Nothing?> declared in <root>.problematic'
|
||||
CALL 'public/*package*/ open fun id <T> (v: kotlin.collections.List<T of <root>.ListId.id?>?): kotlin.collections.List<T of <root>.ListId.id?> declared in <root>.ListId' type=kotlin.collections.List<kotlin.Nothing?> origin=null
|
||||
<T>: kotlin.Nothing
|
||||
RETURN type=kotlin.Nothing from='local final fun <anonymous> (): kotlin.collections.List<kotlin.Any?> declared in <root>.problematic'
|
||||
CALL 'public/*package*/ open fun id <T> (v: kotlin.collections.List<T of <root>.ListId.id?>?): kotlin.collections.List<T of <root>.ListId.id?> declared in <root>.ListId' type=kotlin.collections.List<kotlin.Any?> origin=null
|
||||
<T>: kotlin.Any?
|
||||
v: ERROR_CALL 'Unresolved reference: <Unresolved name: it>#' type=IrErrorType
|
||||
|
||||
Reference in New Issue
Block a user