[FIR] Update testdata after introducing FirResolvedErrorReference
This commit is contained in:
committed by
Space Team
parent
dde64c10ea
commit
b174bb8844
@@ -23,7 +23,7 @@ fun test(l : <!PLATFORM_CLASS_MAPPED_TO_KOTLIN!>java.util.List<Int><!>) {
|
||||
val <!UNUSED_VARIABLE!>f<!> : java.io.File? = null
|
||||
|
||||
Collections.<!FUNCTION_CALL_EXPECTED!>emptyList<!>
|
||||
Collections.<!FUNCTION_CALL_EXPECTED!>emptyList<!><<!CANNOT_INFER_PARAMETER_TYPE!>Int<!>>
|
||||
Collections.<!EXPLICIT_TYPE_ARGUMENTS_IN_PROPERTY_ACCESS, FUNCTION_CALL_EXPECTED!>emptyList<!><<!CANNOT_INFER_PARAMETER_TYPE!>Int<!>>
|
||||
Collections.emptyList<Int>()
|
||||
Collections.<!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>emptyList<!>()
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ fun foo() {
|
||||
<!ANNOTATION_CLASS_CONSTRUCTOR_CALL!>Ann()<!>
|
||||
val a = <!ANNOTATION_CLASS_CONSTRUCTOR_CALL!>Ann()<!>
|
||||
|
||||
<!NO_VALUE_FOR_PARAMETER!>Ann1()<!>
|
||||
<!ANNOTATION_CLASS_CONSTRUCTOR_CALL, NO_VALUE_FOR_PARAMETER!>Ann1()<!>
|
||||
<!ANNOTATION_CLASS_CONSTRUCTOR_CALL!>Ann1(1)<!>
|
||||
bar(<!ANNOTATION_CLASS_CONSTRUCTOR_CALL!>Ann()<!>)
|
||||
bar(a = <!ANNOTATION_CLASS_CONSTRUCTOR_CALL!>Ann()<!>)
|
||||
|
||||
@@ -15,7 +15,7 @@ val a10 = <!DIVISION_BY_ZERO!>1 / 0.0f<!>
|
||||
val a11 = <!DIVISION_BY_ZERO!>1 / 0.0<!>
|
||||
val a12 = <!DIVISION_BY_ZERO!>1L / 0<!>
|
||||
|
||||
val b1: Byte = <!TYPE_MISMATCH!>1 / 0<!>
|
||||
val b1: Byte = <!DIVISION_BY_ZERO, TYPE_MISMATCH!>1 / 0<!>
|
||||
@Ann(<!DIVISION_BY_ZERO!>1 / 0<!>) val b2 = 1
|
||||
|
||||
annotation class Ann(val i : Int)
|
||||
|
||||
+2
-2
@@ -20,7 +20,7 @@ object OnlyOne {
|
||||
fun <T : Comparable<T>, S : T> greater(x: Bar<in S>, t: T) {}
|
||||
|
||||
fun test(b: Bar<Long>) {
|
||||
<!DEBUG_INFO_CALL("fqName: fqName is unknown; typeCall: unresolved")!><!INFERRED_TYPE_VARIABLE_INTO_EMPTY_INTERSECTION!>greater<!>(b, b)<!>
|
||||
<!DEBUG_INFO_CALL("fqName: OnlyOne.greater; typeCall: function")!><!INFERRED_TYPE_VARIABLE_INTO_EMPTY_INTERSECTION!>greater<!>(b, b)<!>
|
||||
}
|
||||
}
|
||||
|
||||
@@ -34,4 +34,4 @@ object GoodOldCandidate {
|
||||
<!DEBUG_INFO_CALL("fqName: GoodOldCandidate.Nested.greater; typeCall: function")!>greater(b, b)<!>
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -19,13 +19,13 @@ FILE: constantUnaryOperators.kt
|
||||
public get(): R|kotlin/Long|
|
||||
public final val i4: R|kotlin/Int| = Int(2).R|kotlin/Int.plus|(Int(2).R|kotlin/Int.times|(Int(3))).R|kotlin/Int.inc|()
|
||||
public get(): R|kotlin/Int|
|
||||
public final val l4: R|kotlin/Long| = Int(2).R|kotlin/Int.plus|(Int(2).R|kotlin/Int.times|(Int(3))).<CS errors: kotlin/Int.inc>#()
|
||||
public final val l4: R|kotlin/Long| = Int(2).R|kotlin/Int.plus|(Int(2).R|kotlin/Int.times|(Int(3))).R|kotlin/Int.inc<CS errors: kotlin/Int.inc>#|()
|
||||
public get(): R|kotlin/Long|
|
||||
public final val ll4: R|kotlin/Long| = Long(3000000000).R|kotlin/Long.times|(Int(2)).R|kotlin/Long.plus|(Int(1)).R|kotlin/Long.inc|()
|
||||
public get(): R|kotlin/Long|
|
||||
public final val i5: R|kotlin/Int| = Int(2).R|kotlin/Int.plus|(Int(2).R|kotlin/Int.times|(Int(3))).R|kotlin/Int.dec|()
|
||||
public get(): R|kotlin/Int|
|
||||
public final val l5: R|kotlin/Long| = Int(2).R|kotlin/Int.plus|(Int(2).R|kotlin/Int.times|(Int(3))).<CS errors: kotlin/Int.dec>#()
|
||||
public final val l5: R|kotlin/Long| = Int(2).R|kotlin/Int.plus|(Int(2).R|kotlin/Int.times|(Int(3))).R|kotlin/Int.dec<CS errors: kotlin/Int.dec>#|()
|
||||
public get(): R|kotlin/Long|
|
||||
public final val ll5: R|kotlin/Long| = Long(3000000000).R|kotlin/Long.times|(Int(2)).R|kotlin/Long.plus|(Int(1)).R|kotlin/Long.dec|()
|
||||
public get(): R|kotlin/Long|
|
||||
|
||||
+6
-6
@@ -24,13 +24,13 @@ FILE: intToLongConversion.fir.kt
|
||||
public final fun takeB(b: R|B|): R|kotlin/Unit| {
|
||||
}
|
||||
public final fun test_constants(): R|kotlin/Unit| {
|
||||
<Inapplicable(INAPPLICABLE): /takeByte>#(Int(1).R|kotlin/Int.plus|(Int(1)))
|
||||
R|/takeByte<Inapplicable(INAPPLICABLE): /takeByte>#|(Int(1).R|kotlin/Int.plus|(Int(1)))
|
||||
R|/takeInt|(Int(1).R|kotlin/Int.plus|(Int(1)).R|kotlin/Int.plus|(Int(1)))
|
||||
R|/takeNullableInt|(Int(1).R|kotlin/Int.plus|(Int(1)).R|kotlin/Int.plus|(Int(1)))
|
||||
R|/takeLong|(Int(1).R|kotlin/Int.plus|(Int(1)).R|kotlin/Int.plus|(Int(1)).R|kotlin/Int.toLong|())
|
||||
R|/takeNullableLong|(Int(1).R|kotlin/Int.plus|(Int(1)).R|kotlin/Int.plus|(Int(1)).R|kotlin/Int.toLong|())
|
||||
lval x: R|B| = R|/takeOverloaded|(Long(2147483648).R|kotlin/Long.minus|(Int(1)).R|kotlin/Long.plus|(Int(1)))
|
||||
<Inapplicable(INAPPLICABLE): /takeA>#(R|<local>/x|)
|
||||
R|/takeA<Inapplicable(INAPPLICABLE): /takeA>#|(R|<local>/x|)
|
||||
R|/takeB|(R|<local>/x|)
|
||||
}
|
||||
public final val topLevelIntProperty: R|kotlin/Int| = Int(1).R|kotlin/Int.plus|(Int(1)).R|kotlin/Int.plus|(Int(1))
|
||||
@@ -46,8 +46,8 @@ FILE: intToLongConversion.fir.kt
|
||||
R|/takeLong|(R|/topLevelLongProperty|)
|
||||
R|/takeInt|(R|/topLevelImplicitIntProperty|)
|
||||
R|/takeLong|(R|/topLevelImplicitLongProperty|)
|
||||
<Inapplicable(INAPPLICABLE): /takeLong>#(R|/topLevelIntProperty|)
|
||||
<Inapplicable(INAPPLICABLE): /takeLong>#(R|/topLevelImplicitIntProperty|)
|
||||
R|/takeLong<Inapplicable(INAPPLICABLE): /takeLong>#|(R|/topLevelIntProperty|)
|
||||
R|/takeLong<Inapplicable(INAPPLICABLE): /takeLong>#|(R|/topLevelImplicitIntProperty|)
|
||||
}
|
||||
public final fun testLocalProperties(): R|kotlin/Unit| {
|
||||
lval localIntProperty: R|kotlin/Int| = Int(1).R|kotlin/Int.plus|(Int(1))
|
||||
@@ -58,6 +58,6 @@ FILE: intToLongConversion.fir.kt
|
||||
R|/takeLong|(R|<local>/localLongProperty|)
|
||||
R|/takeInt|(R|<local>/localImplicitIntProperty|)
|
||||
R|/takeLong|(R|<local>/localImplicitLongProperty|)
|
||||
<Inapplicable(INAPPLICABLE): /takeLong>#(R|<local>/localIntProperty|)
|
||||
<Inapplicable(INAPPLICABLE): /takeLong>#(R|<local>/localImplicitIntProperty|)
|
||||
R|/takeLong<Inapplicable(INAPPLICABLE): /takeLong>#|(R|<local>/localIntProperty|)
|
||||
R|/takeLong<Inapplicable(INAPPLICABLE): /takeLong>#|(R|<local>/localImplicitIntProperty|)
|
||||
}
|
||||
|
||||
@@ -6,11 +6,11 @@ package example
|
||||
fun test() {
|
||||
val p = test.Public()
|
||||
if (p.public is Int) p.public + 1
|
||||
if (p.<!INVISIBLE_REFERENCE!>protected<!> is Int) p.<!INVISIBLE_REFERENCE!>protected<!> <!UNSAFE_OPERATOR_CALL!>+<!> 1
|
||||
if (p.<!INVISIBLE_REFERENCE!>protected<!> is Int) p.<!INVISIBLE_REFERENCE!>protected<!> + 1
|
||||
if (p.internal is Int) p.internal + 1
|
||||
val i = test.Internal()
|
||||
if (i.public is Int) i.public + 1
|
||||
if (i.<!INVISIBLE_REFERENCE!>protected<!> is Int) i.<!INVISIBLE_REFERENCE!>protected<!> <!UNSAFE_OPERATOR_CALL!>+<!> 1
|
||||
if (i.<!INVISIBLE_REFERENCE!>protected<!> is Int) i.<!INVISIBLE_REFERENCE!>protected<!> + 1
|
||||
if (i.internal is Int) i.internal + 1
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -10,7 +10,7 @@ object A {
|
||||
}
|
||||
|
||||
fun test() {
|
||||
takeString(<!ARGUMENT_TYPE_MISMATCH!>A <!UNRESOLVED_REFERENCE!>%<!> 123<!>)
|
||||
takeString(A <!UNRESOLVED_REFERENCE!>%<!> 123)
|
||||
}
|
||||
|
||||
fun takeString(s: String) {}
|
||||
|
||||
@@ -35,7 +35,7 @@ fun test() {
|
||||
val u : <!INVISIBLE_REFERENCE!>A<!> = <!INVISIBLE_REFERENCE!>A<!>()
|
||||
|
||||
val z = <!INVISIBLE_REFERENCE!>x<!>
|
||||
<!INVISIBLE_REFERENCE!>x<!> = 30
|
||||
<!INVISIBLE_REFERENCE, INVISIBLE_SETTER!>x<!> = 30
|
||||
|
||||
val po = <!INVISIBLE_REFERENCE!>PO<!>
|
||||
|
||||
|
||||
+1
-1
@@ -27,7 +27,7 @@ package foo
|
||||
|
||||
fun test(s: bar.Sub<String>) {
|
||||
s.<!INVISIBLE_REFERENCE!>name<!>
|
||||
s.<!INVISIBLE_REFERENCE!>name<!> = ""
|
||||
<!INVISIBLE_SETTER!>s.<!INVISIBLE_REFERENCE!>name<!><!> = ""
|
||||
s.name2
|
||||
<!INVISIBLE_SETTER!>s.name2<!> = ""
|
||||
s.<!INVISIBLE_REFERENCE!>doSomething<!>()
|
||||
|
||||
@@ -41,7 +41,7 @@ open class A {
|
||||
fun foo() {
|
||||
<!UNRESOLVED_REFERENCE!>topLevelFun<!>()
|
||||
<!UNRESOLVED_REFERENCE!>topLevelFun<!>(1)
|
||||
<!UNRESOLVED_REFERENCE, UNRESOLVED_REFERENCE!>topLevelProperty<!>++
|
||||
<!UNRESOLVED_REFERENCE, UNRESOLVED_REFERENCE!>topLevelProperty<!><!UNRESOLVED_REFERENCE!>++<!>
|
||||
"".<!UNRESOLVED_REFERENCE!>topLevelExtensionFun<!>()
|
||||
1.<!UNRESOLVED_REFERENCE!>topLevelExtensionFun<!>()
|
||||
"".<!UNRESOLVED_REFERENCE!>topLevelExtensionProperty<!>
|
||||
|
||||
@@ -35,11 +35,11 @@ fun test() {
|
||||
|
||||
bar {
|
||||
<!DSL_SCOPE_VIOLATION!>a<!> + 1
|
||||
<!DSL_SCOPE_VIOLATION!>a<!> += <!DSL_SCOPE_VIOLATION!>a<!> + 1
|
||||
<!DSL_SCOPE_VIOLATION, DSL_SCOPE_VIOLATION!>a<!> += <!DSL_SCOPE_VIOLATION!>a<!> + 1
|
||||
<!DSL_SCOPE_VIOLATION, DSL_SCOPE_VIOLATION!>a<!>++
|
||||
|
||||
<!DSL_SCOPE_VIOLATION!>a1<!> + 1
|
||||
<!DSL_SCOPE_VIOLATION!>a1<!> += <!DSL_SCOPE_VIOLATION!>a1<!> + 1
|
||||
<!DSL_SCOPE_VIOLATION, DSL_SCOPE_VIOLATION!>a1<!> += <!DSL_SCOPE_VIOLATION!>a1<!> + 1
|
||||
<!DSL_SCOPE_VIOLATION, DSL_SCOPE_VIOLATION!>a1<!>++
|
||||
|
||||
this@foo.a + 1
|
||||
|
||||
@@ -8,6 +8,6 @@ class A {
|
||||
|
||||
class B() {
|
||||
init {
|
||||
A().<!INVISIBLE_REFERENCE!>a<!> = "Hello"
|
||||
<!INVISIBLE_SETTER!>A().<!INVISIBLE_REFERENCE!>a<!><!> = "Hello"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,6 +6,6 @@ class A(private var i: Int, var j: Int) {
|
||||
}
|
||||
|
||||
fun test(a: A) {
|
||||
a.<!INVISIBLE_REFERENCE, INVISIBLE_REFERENCE!>i<!>++
|
||||
<!INVISIBLE_SETTER!>a.<!INVISIBLE_REFERENCE, INVISIBLE_REFERENCE!>i<!><!>++
|
||||
a.j++
|
||||
}
|
||||
|
||||
+1
-1
@@ -14,7 +14,7 @@ class Derived : Base() {
|
||||
x.<!INVISIBLE_REFERENCE!>foo<!>()
|
||||
x.<!INVISIBLE_REFERENCE!>bar<!>()
|
||||
|
||||
x.<!INVISIBLE_REFERENCE!>x<!> = x.<!INVISIBLE_REFERENCE!>x<!> + 1
|
||||
<!INVISIBLE_SETTER!>x.<!INVISIBLE_REFERENCE!>x<!><!> = x.<!INVISIBLE_REFERENCE!>x<!> + 1
|
||||
<!INVISIBLE_SETTER!>x.y<!> = x.y + 1
|
||||
|
||||
if (x is Derived) {
|
||||
|
||||
@@ -54,7 +54,7 @@ open class C : T {
|
||||
}
|
||||
|
||||
fun test4(c: C) {
|
||||
c.<!INVISIBLE_REFERENCE, INVISIBLE_REFERENCE!>i<!>++
|
||||
<!INVISIBLE_SETTER!>c.<!INVISIBLE_REFERENCE, INVISIBLE_REFERENCE!>i<!><!>++
|
||||
}
|
||||
|
||||
class D : C() {
|
||||
|
||||
@@ -31,7 +31,7 @@ fun test() {
|
||||
val u : <!INVISIBLE_REFERENCE!>A<!> = <!INVISIBLE_REFERENCE!>A<!>()
|
||||
|
||||
val z = <!INVISIBLE_REFERENCE!>x<!>
|
||||
<!INVISIBLE_REFERENCE!>x<!> = 30
|
||||
<!INVISIBLE_REFERENCE, INVISIBLE_SETTER!>x<!> = 30
|
||||
|
||||
val po = <!INVISIBLE_REFERENCE!>PO<!>
|
||||
}
|
||||
|
||||
+1
-1
@@ -23,7 +23,7 @@ object Test2 {
|
||||
fun foo(f: KRunnable) {}
|
||||
|
||||
fun test(f: () -> Int) {
|
||||
<!DEBUG_INFO_CALL("fqName: fqName is unknown; typeCall: unresolved")!>foo(<!ARGUMENT_TYPE_MISMATCH!>f<!>)<!>
|
||||
<!DEBUG_INFO_CALL("fqName: Test2.Scope1.foo; typeCall: function")!>foo(<!ARGUMENT_TYPE_MISMATCH!>f<!>)<!>
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Vendored
+1
-1
@@ -53,7 +53,7 @@ fun test() {
|
||||
|
||||
takeULong(<!ARGUMENT_TYPE_MISMATCH!>IMPLICIT_INT<!>)
|
||||
|
||||
takeUBytes(<!ARGUMENT_TYPE_MISMATCH!>IMPLICIT_INT<!>, <!ARGUMENT_TYPE_MISMATCH!>EXPLICIT_INT<!>, 42u)
|
||||
<!OPT_IN_USAGE!>takeUBytes<!>(<!ARGUMENT_TYPE_MISMATCH!>IMPLICIT_INT<!>, <!ARGUMENT_TYPE_MISMATCH!>EXPLICIT_INT<!>, 42u)
|
||||
|
||||
takeLong(<!ARGUMENT_TYPE_MISMATCH!>IMPLICIT_INT<!>)
|
||||
|
||||
|
||||
+1
-1
@@ -33,7 +33,7 @@ fun test() {
|
||||
takeUInt(<!ARGUMENT_TYPE_MISMATCH!>Int.MAX_VALUE * 2<!>)
|
||||
takeUInt(<!ARGUMENT_TYPE_MISMATCH!>4294967294<!>)
|
||||
|
||||
takeUBytes(<!ARGUMENT_TYPE_MISMATCH!>1<!>, <!ARGUMENT_TYPE_MISMATCH!>2<!>, <!ARGUMENT_TYPE_MISMATCH!>255<!>, <!ARGUMENT_TYPE_MISMATCH!>256<!>, <!ARGUMENT_TYPE_MISMATCH!>0<!>, <!ARGUMENT_TYPE_MISMATCH!>-1<!>, <!ARGUMENT_TYPE_MISMATCH!>40 + 2<!>)
|
||||
<!OPT_IN_USAGE!>takeUBytes<!>(<!ARGUMENT_TYPE_MISMATCH!>1<!>, <!ARGUMENT_TYPE_MISMATCH!>2<!>, <!ARGUMENT_TYPE_MISMATCH!>255<!>, <!ARGUMENT_TYPE_MISMATCH!>256<!>, <!ARGUMENT_TYPE_MISMATCH!>0<!>, <!ARGUMENT_TYPE_MISMATCH!>-1<!>, <!ARGUMENT_TYPE_MISMATCH!>40 + 2<!>)
|
||||
|
||||
takeUInt(<!ARGUMENT_TYPE_MISMATCH!>1.myPlus(2)<!>)
|
||||
|
||||
|
||||
@@ -15,23 +15,23 @@ class Test<in I, out O> {
|
||||
this.i = getT()
|
||||
with(Test<I, O>()) {
|
||||
i = getT() // resolved to this@Test.i
|
||||
this.<!INVISIBLE_REFERENCE!>i<!> = getT()
|
||||
this@with.<!INVISIBLE_REFERENCE!>i<!> = getT()
|
||||
<!INVISIBLE_SETTER!>this.<!INVISIBLE_REFERENCE!>i<!><!> = getT()
|
||||
<!INVISIBLE_SETTER!>this@with.<!INVISIBLE_REFERENCE!>i<!><!> = getT()
|
||||
this@Test.i = getT()
|
||||
}
|
||||
}
|
||||
|
||||
fun <I, O> test(t: Test<I, O>) {
|
||||
t.<!INVISIBLE_REFERENCE!>i<!> = getT()
|
||||
<!INVISIBLE_SETTER!>t.<!INVISIBLE_REFERENCE!>i<!><!> = getT()
|
||||
}
|
||||
|
||||
companion object {
|
||||
fun <I, O> test(t: Test<I, O>) {
|
||||
t.<!INVISIBLE_REFERENCE!>i<!> = getT()
|
||||
<!INVISIBLE_SETTER!>t.<!INVISIBLE_REFERENCE!>i<!><!> = getT()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fun <I, O> test(t: Test<I, O>) {
|
||||
t.<!INVISIBLE_REFERENCE!>i<!> = getT()
|
||||
<!INVISIBLE_SETTER!>t.<!INVISIBLE_REFERENCE!>i<!><!> = getT()
|
||||
}
|
||||
|
||||
@@ -16,11 +16,11 @@ FILE: privateToThis.fir.kt
|
||||
}
|
||||
|
||||
public final fun foo(a: R|A<kotlin/String>|): R|kotlin/Unit| {
|
||||
lval x: R|kotlin/String| = R|<local>/a|.<HIDDEN: /A.t is invisible>#
|
||||
lval x: R|kotlin/String| = R|<local>/a|.R|SubstitutionOverride</A.t: R|kotlin/String|><HIDDEN: /A.t is invisible>#|
|
||||
}
|
||||
|
||||
public final fun bar(a: R|A<*>|): R|kotlin/Unit| {
|
||||
R|<local>/a|.<HIDDEN: /A.t is invisible>#
|
||||
R|<local>/a|.R|SubstitutionOverride</A.t: R|CapturedType(*)|><HIDDEN: /A.t is invisible>#|
|
||||
}
|
||||
|
||||
public final inner class B<in T> : R|kotlin/Any| {
|
||||
|
||||
Reference in New Issue
Block a user