[FIR] Properly create type ref for error type in various places
This commit is contained in:
committed by
Space Team
parent
ad3ae0ff69
commit
e9204521a9
@@ -11,7 +11,7 @@ FILE: class.kt
|
||||
private [BODY_RESOLVE] get(): <ERROR TYPE REF: Symbol not found for C>
|
||||
|
||||
public final [BODY_RESOLVE] fun foo([BODY_RESOLVE] a: <ERROR TYPE REF: Symbol not found for A>): <ERROR TYPE REF: Cannot infer argument for type parameter R> {
|
||||
^foo R|kotlin/with<CS errors: kotlin/with>#|<R|ERROR CLASS: Cannot infer argument for type parameter T|, R|ERROR CLASS: Cannot infer argument for type parameter R|>(R|<local>/a|, <L> = [BODY_RESOLVE] with@fun <ERROR TYPE REF: Cannot infer argument for type parameter T>.<anonymous>(): <ERROR TYPE REF: Cannot infer argument for type parameter R> <inline=Inline, kind=EXACTLY_ONCE> {
|
||||
^foo R|kotlin/with<CS errors: kotlin/with>#|<<ERROR TYPE REF: Cannot infer argument for type parameter T>, <ERROR TYPE REF: Cannot infer argument for type parameter R>>(R|<local>/a|, <L> = [BODY_RESOLVE] with@fun <ERROR TYPE REF: Cannot infer argument for type parameter T>.<anonymous>(): <ERROR TYPE REF: Cannot infer argument for type parameter R> <inline=Inline, kind=EXACTLY_ONCE> {
|
||||
^ <Unresolved name: bar>#(String(a), this@R|/B|.R|/B.y|)
|
||||
}
|
||||
)
|
||||
|
||||
+1
-1
@@ -11,7 +11,7 @@ FILE: lambdaInUnresolvedCall.kt
|
||||
}
|
||||
public final fun test_2(): R|kotlin/Unit| {
|
||||
<Unresolved name: myRun>#(<L> = myRun@fun <anonymous>(): <ERROR TYPE REF: Cannot infer argument for type parameter R> <inline=Unknown> {
|
||||
^ R|/materialize|<R|ERROR CLASS: Cannot infer argument for type parameter R|>()
|
||||
^ R|/materialize|<<ERROR TYPE REF: Cannot infer argument for type parameter R>>()
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
Vendored
+1
-1
@@ -1,7 +1,7 @@
|
||||
FILE: erroneousDelegatedConstructorCall.kt
|
||||
public final class A : <ERROR TYPE REF: Symbol not found for Undefined> {
|
||||
public constructor(): R|A| {
|
||||
super<<ERROR TYPE REF: Symbol not found for Undefined>>(R|/id|<R|ERROR CLASS: Cannot infer argument for type parameter K|>(R|/materialize|<R|ERROR CLASS: Cannot infer argument for type parameter K|>()))
|
||||
super<<ERROR TYPE REF: Symbol not found for Undefined>>(R|/id|<<ERROR TYPE REF: Cannot infer argument for type parameter K>>(R|/materialize|<<ERROR TYPE REF: Cannot infer argument for type parameter K>>()))
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+2
-2
@@ -148,13 +148,13 @@ FILE: conflictingProjection.kt
|
||||
^test15 R|/InOuter.InOuter|<R|kotlin/Int|>().R|SubstitutionOverride</InOuter.OutIntermediate.OutIntermediate>|<R|kotlin/String|>().R|SubstitutionOverride</InOuter.OutIntermediate.InInner.InInner>|<R|kotlin/Char|>()
|
||||
}
|
||||
public final fun test16(): R|InOuter.OutIntermediate.InInner<out kotlin/Char, kotlin/String, kotlin/Int>| {
|
||||
^test16 R|/InOuter.InOuter|<R|kotlin/Int|>().R|SubstitutionOverride</InOuter.OutIntermediate.OutIntermediate>|<R|kotlin/String|>().R|SubstitutionOverride</InOuter.OutIntermediate.InInner.InInner><CS errors: /InOuter.OutIntermediate.InInner.InInner>#|<R|ERROR CLASS: Cannot infer argument for type parameter G|>()
|
||||
^test16 R|/InOuter.InOuter|<R|kotlin/Int|>().R|SubstitutionOverride</InOuter.OutIntermediate.OutIntermediate>|<R|kotlin/String|>().R|SubstitutionOverride</InOuter.OutIntermediate.InInner.InInner><CS errors: /InOuter.OutIntermediate.InInner.InInner>#|<<ERROR TYPE REF: Cannot infer argument for type parameter G>>()
|
||||
}
|
||||
public final fun test17(): R|InOuter.OutIntermediate.InInner<kotlin/Char, out kotlin/String, in kotlin/Int>| {
|
||||
^test17 R|/InOuter.InOuter|<R|kotlin/Int|>().R|SubstitutionOverride</InOuter.OutIntermediate.OutIntermediate>|<R|kotlin/String|>().R|SubstitutionOverride</InOuter.OutIntermediate.InInner.InInner>|<R|kotlin/Char|>()
|
||||
}
|
||||
public final fun test18(): R|InOuter.OutIntermediate.InInner<out kotlin/Char, in kotlin/String, kotlin/Int>| {
|
||||
^test18 R|/InOuter.InOuter|<R|kotlin/Int|>().R|SubstitutionOverride</InOuter.OutIntermediate.OutIntermediate>|<R|kotlin/String|>().R|SubstitutionOverride</InOuter.OutIntermediate.InInner.InInner><CS errors: /InOuter.OutIntermediate.InInner.InInner>#|<R|ERROR CLASS: Cannot infer argument for type parameter G|>()
|
||||
^test18 R|/InOuter.InOuter|<R|kotlin/Int|>().R|SubstitutionOverride</InOuter.OutIntermediate.OutIntermediate>|<R|kotlin/String|>().R|SubstitutionOverride</InOuter.OutIntermediate.InInner.InInner><CS errors: /InOuter.OutIntermediate.InInner.InInner>#|<<ERROR TYPE REF: Cannot infer argument for type parameter G>>()
|
||||
}
|
||||
public final class TwoParametersOuter<T, in T1> : R|kotlin/Any| {
|
||||
public constructor<T, in T1>(): R|TwoParametersOuter<T, T1>| {
|
||||
|
||||
+1
-1
@@ -83,7 +83,7 @@ FILE: upperBoundViolated.kt
|
||||
}
|
||||
public final val np1: R|NumberPhile<kotlin/Int>| = R|/NumberPhile.NumberPhile|<R|kotlin/Int|>(Int(10))
|
||||
public get(): R|NumberPhile<kotlin/Int>|
|
||||
public final val np2: R|NumberPhile<ERROR CLASS: Cannot infer argument for type parameter T>| = R|/NumberPhile.NumberPhile<Inapplicable(INAPPLICABLE): /NumberPhile.NumberPhile>#|<R|ERROR CLASS: Cannot infer argument for type parameter T|>(String(Test))
|
||||
public final val np2: R|NumberPhile<ERROR CLASS: Cannot infer argument for type parameter T>| = R|/NumberPhile.NumberPhile<Inapplicable(INAPPLICABLE): /NumberPhile.NumberPhile>#|<<ERROR TYPE REF: Cannot infer argument for type parameter T>>(String(Test))
|
||||
public get(): R|NumberPhile<ERROR CLASS: Cannot infer argument for type parameter T>|
|
||||
public final class Test1<S1 : R|Test1<S1, K>|, K : R|kotlin/Any|> : R|kotlin/Any| {
|
||||
public constructor<S1 : R|Test1<S1, K>|, K : R|kotlin/Any|>(): R|Test1<S1, K>| {
|
||||
|
||||
Vendored
+2
-2
@@ -33,8 +33,8 @@ class CallBasedInExpressionGenerator(
|
||||
}
|
||||
|
||||
private fun invokeFunction(v: InstructionAdapter) {
|
||||
val result = codegen.<!UNRESOLVED_REFERENCE!>invokeFunction<!>(resolvedCall.<!UNRESOLVED_REFERENCE!>call<!>, resolvedCall, <!UNRESOLVED_REFERENCE!>none<!>())
|
||||
result.<!UNRESOLVED_REFERENCE!>put<!>(result.<!UNRESOLVED_REFERENCE!>type<!>, result.<!UNRESOLVED_REFERENCE!>kotlinType<!>, v)
|
||||
val result = codegen.<!UNRESOLVED_REFERENCE!>invokeFunction<!>(resolvedCall.call, resolvedCall, <!UNRESOLVED_REFERENCE!>none<!>())
|
||||
result.put(result.type, result.kotlinType, v)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -18,5 +18,5 @@ FILE: typeParameters.kt
|
||||
}
|
||||
public final fun main(fooImpl: R|FooImpl|, bar: R|Bar|): R|kotlin/Unit| {
|
||||
lval a: R|FooImpl| = R|/foo|<R|FooImpl|>(R|<local>/fooImpl|)
|
||||
lval b: <ERROR TYPE REF: Cannot infer argument for type parameter T> = R|/foo<Inapplicable(INAPPLICABLE): /foo>#|<R|ERROR CLASS: Cannot infer argument for type parameter T|>(R|<local>/bar|)
|
||||
lval b: <ERROR TYPE REF: Cannot infer argument for type parameter T> = R|/foo<Inapplicable(INAPPLICABLE): /foo>#|<<ERROR TYPE REF: Cannot infer argument for type parameter T>>(R|<local>/bar|)
|
||||
}
|
||||
|
||||
+1
-1
@@ -24,5 +24,5 @@ FILE: supertypeGenericsComplex.kt
|
||||
}
|
||||
public final fun f(list: R|kotlin/collections/MutableList<X>|, s: R|kotlin/collections/MutableList<kotlin/CharSequence>|): R|kotlin/Unit| {
|
||||
R|/C.C|().R|SubstitutionOverride</C.f: R|kotlin/Unit|>|<R|X|>(R|<local>/list|, R|<local>/s|)
|
||||
R|/C.C|().R|SubstitutionOverride</C.f: R|kotlin/Unit|><Inapplicable(INAPPLICABLE): /C.f>#|<R|ERROR CLASS: Cannot infer argument for type parameter D|>(R|<local>/s|, R|<local>/list|)
|
||||
R|/C.C|().R|SubstitutionOverride</C.f: R|kotlin/Unit|><Inapplicable(INAPPLICABLE): /C.f>#|<<ERROR TYPE REF: Cannot infer argument for type parameter D>>(R|<local>/s|, R|<local>/list|)
|
||||
}
|
||||
|
||||
+1
-1
@@ -8,7 +8,7 @@ FILE: main.kt
|
||||
^ R|<local>/x|.R|kotlin/Int.toString|()
|
||||
}
|
||||
)
|
||||
R|/MyFunction<CS errors: /MyFunction>#|<R|ERROR CLASS: Cannot infer argument for type parameter T|, R|ERROR CLASS: Cannot infer argument for type parameter R|>(<L> = MyFunction@fun <anonymous>(x: <ERROR TYPE REF: Cannot infer argument for type parameter T>): <ERROR TYPE REF: Cannot infer argument for type parameter R> <inline=NoInline> {
|
||||
R|/MyFunction<CS errors: /MyFunction>#|<<ERROR TYPE REF: Cannot infer argument for type parameter T>, <ERROR TYPE REF: Cannot infer argument for type parameter R>>(<L> = MyFunction@fun <anonymous>(x: <ERROR TYPE REF: Cannot infer argument for type parameter T>): <ERROR TYPE REF: Cannot infer argument for type parameter R> <inline=NoInline> {
|
||||
^ String()
|
||||
}
|
||||
)
|
||||
|
||||
@@ -14,7 +14,7 @@ FILE: tryInference.kt
|
||||
R|/materialize|<R|A|>()
|
||||
}
|
||||
finally {
|
||||
R|/materialize<CS errors: /materialize>#|<R|ERROR CLASS: Cannot infer argument for type parameter T|>()
|
||||
R|/materialize<CS errors: /materialize>#|<<ERROR TYPE REF: Cannot infer argument for type parameter T>>()
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
+1
-1
@@ -6,5 +6,5 @@ FILE: ambiguityWhenNoApplicableCallableReferenceCandidate.kt
|
||||
public final fun <T> bar(f: R|(T) -> kotlin/Unit|): R|kotlin/Unit| {
|
||||
}
|
||||
public final fun test(): R|kotlin/Unit| {
|
||||
R|/bar<CS errors: /bar>#|<R|ERROR CLASS: Cannot infer argument for type parameter T|>(::<Ambiguity: foo, [/foo, /foo]>#)
|
||||
R|/bar<CS errors: /bar>#|<<ERROR TYPE REF: Cannot infer argument for type parameter T>>(::<Ambiguity: foo, [/foo, /foo]>#)
|
||||
}
|
||||
|
||||
+3
-3
@@ -30,14 +30,14 @@ FILE: chooseCallableReferenceDependingOnInferredReceiver.kt
|
||||
^bar R|kotlin/TODO|()
|
||||
}
|
||||
public final fun test(): R|kotlin/Unit| {
|
||||
R|/myWith<CS errors: /myWith>#|<R|A|, R|ERROR CLASS: Cannot infer argument for type parameter R|>(R|/A.A|(), <L> = myWith@fun R|A|.<anonymous>(): <ERROR TYPE REF: Cannot infer argument for type parameter R> <inline=Inline, kind=UNKNOWN> {
|
||||
R|/myWith<CS errors: /myWith>#|<R|A|, <ERROR TYPE REF: Cannot infer argument for type parameter R>>(R|/A.A|(), <L> = myWith@fun R|A|.<anonymous>(): <ERROR TYPE REF: Cannot infer argument for type parameter R> <inline=Inline, kind=UNKNOWN> {
|
||||
lval t1: R|A| = R|/bar|<R|A|>(::R|/A.foo|)
|
||||
lval t2: R|A| = R|/bar|<R|A|>(::R|/A.baz|)
|
||||
^ R|/myWith|<R|B|, R|ERROR CLASS: Cannot infer argument for type parameter R|>(R|/B.B|(), <L> = myWith@fun R|B|.<anonymous>(): <ERROR TYPE REF: Cannot infer argument for type parameter R> <inline=Inline, kind=UNKNOWN> {
|
||||
^ R|/myWith|<R|B|, <ERROR TYPE REF: Cannot infer argument for type parameter R>>(R|/B.B|(), <L> = myWith@fun R|B|.<anonymous>(): <ERROR TYPE REF: Cannot infer argument for type parameter R> <inline=Inline, kind=UNKNOWN> {
|
||||
lval a: R|A| = R|/bar|<R|A|>(::R|/A.foo|)
|
||||
lval b: R|B| = R|/bar|<R|B|>(::R|/B.foo|)
|
||||
lval t3: R|B| = R|/bar|<R|B|>(::R|/B.baz|)
|
||||
^ R|/bar|<R|ERROR CLASS: Cannot infer argument for type parameter T|>(::<Ambiguity: foo, [/B.foo, /B.foo]>#)
|
||||
^ R|/bar|<<ERROR TYPE REF: Cannot infer argument for type parameter T>>(::<Ambiguity: foo, [/B.foo, /B.foo]>#)
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
+1
-1
@@ -21,5 +21,5 @@ FILE: eagerAndPostponedCallableReferences.kt
|
||||
lval a4: R|B| = R|/foo|<R|B|>(::R|/multiple|, ::R|/singleB|)
|
||||
lval a5: R|A| = R|/foo|<R|A|>(::R|/singleA|, ::R|/singleA|)
|
||||
lval a6: R|it(A & B)| = R|/foo|<R|it(A & B)|>(::R|/singleA|, ::R|/singleB|)
|
||||
R|/foo<CS errors: /foo>#|<R|ERROR CLASS: Cannot infer argument for type parameter T|>(::<Ambiguity: multiple, [/multiple, /multiple]>#, ::<Ambiguity: multiple, [/multiple, /multiple]>#)
|
||||
R|/foo<CS errors: /foo>#|<<ERROR TYPE REF: Cannot infer argument for type parameter T>>(::<Ambiguity: multiple, [/multiple, /multiple]>#, ::<Ambiguity: multiple, [/multiple, /multiple]>#)
|
||||
}
|
||||
|
||||
Vendored
+1
-1
@@ -9,7 +9,7 @@ FILE: implicitTypes.kt
|
||||
^bar Int(1)
|
||||
}
|
||||
public final fun loop1(): R|(ERROR CLASS: Cannot infer argument for type parameter T) -> ERROR CLASS: Cannot infer argument for type parameter R| {
|
||||
^loop1 R|/use<Inapplicable(INAPPLICABLE): /use>#|<R|ERROR CLASS: Cannot infer argument for type parameter T|, R|ERROR CLASS: Cannot infer argument for type parameter R|>(::<Unresolved reference: loop2>#)
|
||||
^loop1 R|/use<Inapplicable(INAPPLICABLE): /use>#|<<ERROR TYPE REF: Cannot infer argument for type parameter T>, <ERROR TYPE REF: Cannot infer argument for type parameter R>>(::<Unresolved reference: loop2>#)
|
||||
}
|
||||
public final fun loop2(): <ERROR TYPE REF: cycle> {
|
||||
^loop2 R|/loop1|()
|
||||
|
||||
@@ -17,7 +17,6 @@ import org.jetbrains.kotlin.fir.expressions.builder.buildThisReceiverExpression
|
||||
import org.jetbrains.kotlin.fir.references.builder.buildImplicitThisReference
|
||||
import org.jetbrains.kotlin.fir.renderWithType
|
||||
import org.jetbrains.kotlin.fir.resolve.ScopeSession
|
||||
import org.jetbrains.kotlin.fir.types.constructType
|
||||
import org.jetbrains.kotlin.fir.resolve.scope
|
||||
import org.jetbrains.kotlin.fir.resolve.smartcastScope
|
||||
import org.jetbrains.kotlin.fir.scopes.FakeOverrideTypeCalculator
|
||||
@@ -26,11 +25,8 @@ import org.jetbrains.kotlin.fir.symbols.FirBasedSymbol
|
||||
import org.jetbrains.kotlin.fir.symbols.impl.FirCallableSymbol
|
||||
import org.jetbrains.kotlin.fir.symbols.impl.FirClassSymbol
|
||||
import org.jetbrains.kotlin.fir.symbols.impl.FirScriptSymbol
|
||||
import org.jetbrains.kotlin.fir.types.ConeErrorType
|
||||
import org.jetbrains.kotlin.fir.types.ConeKotlinType
|
||||
import org.jetbrains.kotlin.fir.types.*
|
||||
import org.jetbrains.kotlin.fir.types.builder.buildResolvedTypeRef
|
||||
import org.jetbrains.kotlin.fir.types.coneType
|
||||
import org.jetbrains.kotlin.fir.types.coneTypeSafe
|
||||
import org.jetbrains.kotlin.name.Name
|
||||
import org.jetbrains.kotlin.types.SmartcastStability
|
||||
|
||||
@@ -154,9 +150,7 @@ private fun receiverExpression(
|
||||
boundSymbol = symbol
|
||||
this.contextReceiverNumber = contextReceiverNumber
|
||||
}
|
||||
typeRef = buildResolvedTypeRef {
|
||||
this.type = type
|
||||
}
|
||||
typeRef = type.toFirResolvedTypeRef()
|
||||
isImplicit = true
|
||||
}
|
||||
|
||||
|
||||
@@ -358,11 +358,7 @@ private fun BodyResolveComponents.typeFromSymbol(symbol: FirBasedSymbol<*>, make
|
||||
KtFakeSourceElementKind.ImplicitTypeRef
|
||||
)
|
||||
} else {
|
||||
buildResolvedTypeRef {
|
||||
source = returnTypeRef.source?.fakeElement(KtFakeSourceElementKind.ImplicitTypeRef)
|
||||
type = returnTypeRef.type
|
||||
annotations += returnTypeRef.annotations
|
||||
}
|
||||
returnTypeRef.copyWithNewSourceKind(KtFakeSourceElementKind.ImplicitTypeRef)
|
||||
}
|
||||
}
|
||||
is FirClassifierSymbol<*> -> {
|
||||
|
||||
+1
-3
@@ -508,9 +508,7 @@ class FirCallCompletionResultsWriterTransformer(
|
||||
else -> {
|
||||
buildTypeProjectionWithVariance {
|
||||
source = argument?.source
|
||||
typeRef = buildResolvedTypeRef {
|
||||
this.type = type
|
||||
}
|
||||
typeRef = type.toFirResolvedTypeRef()
|
||||
variance = Variance.INVARIANT
|
||||
}
|
||||
}
|
||||
|
||||
+2
-9
@@ -7,8 +7,7 @@ package org.jetbrains.kotlin.fir.resolve.transformers.body.resolve
|
||||
|
||||
import org.jetbrains.kotlin.KtFakeSourceElementKind
|
||||
import org.jetbrains.kotlin.fakeElement
|
||||
import org.jetbrains.kotlin.fir.FirElement
|
||||
import org.jetbrains.kotlin.fir.FirSession
|
||||
import org.jetbrains.kotlin.fir.*
|
||||
import org.jetbrains.kotlin.fir.declarations.FirValueParameter
|
||||
import org.jetbrains.kotlin.fir.diagnostics.ConeSimpleDiagnostic
|
||||
import org.jetbrains.kotlin.fir.diagnostics.DiagnosticKind
|
||||
@@ -16,9 +15,7 @@ import org.jetbrains.kotlin.fir.expressions.FirBlock
|
||||
import org.jetbrains.kotlin.fir.expressions.FirExpression
|
||||
import org.jetbrains.kotlin.fir.expressions.FirNamedArgumentExpression
|
||||
import org.jetbrains.kotlin.fir.expressions.builder.buildVarargArgumentsExpression
|
||||
import org.jetbrains.kotlin.fir.renderWithType
|
||||
import org.jetbrains.kotlin.fir.resolve.providers.symbolProvider
|
||||
import org.jetbrains.kotlin.fir.resolvedTypeFromPrototype
|
||||
import org.jetbrains.kotlin.fir.symbols.FirBasedSymbol
|
||||
import org.jetbrains.kotlin.fir.types.*
|
||||
import org.jetbrains.kotlin.fir.types.builder.buildErrorTypeRef
|
||||
@@ -90,11 +87,7 @@ fun FirBlock.writeResultType(session: FirSession) {
|
||||
} else {
|
||||
val theType = resultExpression.resultType
|
||||
if (theType is FirResolvedTypeRef) {
|
||||
buildResolvedTypeRef {
|
||||
source = theType.source?.fakeElement(KtFakeSourceElementKind.ImplicitTypeRef)
|
||||
type = theType.type
|
||||
annotations += theType.annotations
|
||||
}
|
||||
theType.copyWithNewSourceKind(KtFakeSourceElementKind.ImplicitTypeRef)
|
||||
} else {
|
||||
buildErrorTypeRef {
|
||||
diagnostic = ConeSimpleDiagnostic("No type for block", DiagnosticKind.InferenceError)
|
||||
|
||||
+2
-8
@@ -113,10 +113,7 @@ open class FirExpressionsResolveTransformer(transformer: FirAbstractBodyResolveT
|
||||
source = qualifiedAccessExpression.source
|
||||
diagnostic = ConeInstanceAccessBeforeSuperCall("<this>")
|
||||
}
|
||||
implicitType != null -> buildResolvedTypeRef {
|
||||
source = callee.source
|
||||
type = implicitType
|
||||
}
|
||||
implicitType != null -> implicitType.toFirResolvedTypeRef(callee.source?.fakeElement(KtFakeSourceElementKind.ImplicitTypeRef))
|
||||
labelName != null -> buildErrorTypeRef {
|
||||
source = qualifiedAccessExpression.source
|
||||
diagnostic = ConeSimpleDiagnostic("Unresolved this@$labelName", DiagnosticKind.UnresolvedLabel)
|
||||
@@ -310,10 +307,7 @@ open class FirExpressionsResolveTransformer(transformer: FirAbstractBodyResolveT
|
||||
// Report stub error so that it won't surface up. Instead, errors on the callee would be reported.
|
||||
diagnostic = ConeStubDiagnostic(ConeSimpleDiagnostic("Unresolved super method", DiagnosticKind.Other))
|
||||
}
|
||||
1 -> buildResolvedTypeRef {
|
||||
source = superReferenceContainer.source?.fakeElement(KtFakeSourceElementKind.SuperCallImplicitType)
|
||||
type = types.single()
|
||||
}
|
||||
1 -> types.single().toFirResolvedTypeRef(superReferenceContainer.source?.fakeElement(KtFakeSourceElementKind.SuperCallImplicitType))
|
||||
else -> buildErrorTypeRef {
|
||||
source = superReferenceContainer.source
|
||||
diagnostic = ConeAmbiguousSuper(types)
|
||||
|
||||
Vendored
+2
-2
@@ -31,8 +31,8 @@ fun bar(aInstance: A, bInstance: B) {
|
||||
|
||||
<!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>foo<!>(bInstance) {
|
||||
<!CANNOT_INFER_PARAMETER_TYPE, COMPONENT_FUNCTION_MISSING, COMPONENT_FUNCTION_MISSING!>(a, b)<!>, (c, d) ->
|
||||
a <!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>checkType<!> { _<Int>() }
|
||||
b <!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>checkType<!> { _<String>() }
|
||||
a checkType { _<Int>() }
|
||||
b checkType { _<String>() }
|
||||
c checkType { _<Double>() }
|
||||
d checkType { _<Short>() }
|
||||
}
|
||||
|
||||
@@ -71,5 +71,5 @@ fun test(b: B) {
|
||||
b_3.m2()
|
||||
|
||||
val b_4 = <!UNRESOLVED_REFERENCE!>a<!>.B()
|
||||
b_4.<!UNRESOLVED_REFERENCE!>m2<!>()
|
||||
b_4.m2()
|
||||
}
|
||||
|
||||
Vendored
+4
-4
@@ -26,9 +26,9 @@ fun test(a_: a.b) {
|
||||
a_.a_b()
|
||||
|
||||
val a_2 = a.<!UNRESOLVED_REFERENCE!>b<!>()
|
||||
a_2.<!UNRESOLVED_REFERENCE!>a_b<!>()
|
||||
a_2.<!UNRESOLVED_REFERENCE!>some_ab<!>()
|
||||
a_2.<!UNRESOLVED_REFERENCE!>a_<!>()
|
||||
a_2.a_b()
|
||||
a_2.some_ab()
|
||||
a_2.a_()
|
||||
}
|
||||
|
||||
// FILE: c2.kt
|
||||
@@ -55,4 +55,4 @@ fun test(_ab: a.b) {
|
||||
|
||||
val _ab2 = a.b()
|
||||
_ab2.some_ab()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -59,6 +59,6 @@ class CG : G<Int> {
|
||||
class ERROR<E>() : <!UNRESOLVED_REFERENCE!>UR<!> {
|
||||
|
||||
fun test() {
|
||||
super.<!UNRESOLVED_REFERENCE!>foo<!>()
|
||||
<!UNRESOLVED_REFERENCE!>super<!>.<!UNRESOLVED_REFERENCE!>foo<!>()
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -18,7 +18,7 @@ FILE: kt50994.fir.kt
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
public final var processors: R|kotlin/collections/MutableCollection<ERROR CLASS: Type for TC is not inferred>|by this@R|/ProcessorWithChildren|.R|/children<Inapplicable(INAPPLICABLE): /children>#|<R|ERROR CLASS: Type for SC is not inferred|, R|ERROR CLASS: Type for TC is not inferred|>(<getClass>(Q|ProcessorWithParent|).R|kotlin/jvm/java|<R|ProcessorWithParent|>, Q|ProcessorWithParent|::<Unresolved reference: processor>#)
|
||||
public final var processors: R|kotlin/collections/MutableCollection<ERROR CLASS: Type for TC is not inferred>|by this@R|/ProcessorWithChildren|.R|/children<Inapplicable(INAPPLICABLE): /children>#|<<ERROR TYPE REF: Type for SC is not inferred>, <ERROR TYPE REF: Type for TC is not inferred>>(<getClass>(Q|ProcessorWithParent|).R|kotlin/jvm/java|<R|ProcessorWithParent|>, Q|ProcessorWithParent|::<Unresolved reference: processor>#)
|
||||
public get(): R|kotlin/collections/MutableCollection<ERROR CLASS: Type for TC is not inferred>| {
|
||||
^ this@R|/ProcessorWithChildren|.D|/ProcessorWithChildren.processors|.R|SubstitutionOverride</Delegate.getValue: R|kotlin/collections/MutableCollection<Stub (chain inference): TypeVariable(_TC)>|>|(this@R|/ProcessorWithChildren|, ::R|/ProcessorWithChildren.processors|)
|
||||
}
|
||||
|
||||
Vendored
+1
-1
@@ -8,7 +8,7 @@ annotation class Ann(val x: Int)
|
||||
fun foo(i: Inv<@Ann(<!UNRESOLVED_REFERENCE!>unresolved_reference<!>) String>) {}
|
||||
|
||||
// TESTCASE NUMBER: 2
|
||||
fun test(vararg a: @Ann(unresolved_reference) Any) {}
|
||||
fun test(vararg a: @Ann(<!UNRESOLVED_REFERENCE!>unresolved_reference<!>) Any) {}
|
||||
|
||||
// TESTCASE NUMBER: 3
|
||||
class A<T>(a: @Ann(<!UNRESOLVED_REFERENCE!>unresolved_reference<!>) T)
|
||||
|
||||
Reference in New Issue
Block a user