FIR: implement LT positioning in diagnostic tests, fix LT strategies
This commit is contained in:
+1
-1
@@ -1,5 +1,5 @@
|
||||
annotation class A() {
|
||||
<!ANNOTATION_CLASS_MEMBER!><!PRIMARY_CONSTRUCTOR_DELEGATION_CALL_EXPECTED{PSI}!>constructor(s: Nothing?)<!><!PRIMARY_CONSTRUCTOR_DELEGATION_CALL_EXPECTED{LT}!><!> {}<!>
|
||||
<!ANNOTATION_CLASS_MEMBER!><!PRIMARY_CONSTRUCTOR_DELEGATION_CALL_EXPECTED!>constructor(s: Nothing?)<!> {}<!>
|
||||
<!ANNOTATION_CLASS_MEMBER!>init {}<!>
|
||||
<!ANNOTATION_CLASS_MEMBER!>fun foo() {}<!>
|
||||
<!ANNOTATION_CLASS_MEMBER!>val bar: Nothing?<!>
|
||||
|
||||
+7
-7
@@ -1,6 +1,6 @@
|
||||
<!CONFLICTING_OVERLOADS{LT}!><!CONFLICTING_OVERLOADS{PSI}!>fun test(x: Int)<!> {}<!>
|
||||
<!CONFLICTING_OVERLOADS!>fun test(x: Int)<!> {}
|
||||
|
||||
<!CONFLICTING_OVERLOADS{LT}!><!CONFLICTING_OVERLOADS{PSI}!>fun test(y: Int)<!> {}<!>
|
||||
<!CONFLICTING_OVERLOADS!>fun test(y: Int)<!> {}
|
||||
|
||||
fun test() {}
|
||||
|
||||
@@ -17,9 +17,9 @@ fun test(z: Int, c: Char) {}
|
||||
}<!>
|
||||
|
||||
<!REDECLARATION!>class B : A {
|
||||
<!CONFLICTING_OVERLOADS{LT}!><!CONFLICTING_OVERLOADS{PSI}!>override fun rest(s: String)<!> {}<!>
|
||||
<!CONFLICTING_OVERLOADS!>override fun rest(s: String)<!> {}
|
||||
|
||||
<!CONFLICTING_OVERLOADS{LT}!><!CONFLICTING_OVERLOADS{PSI}!>fun rest(s: String)<!> {}<!>
|
||||
<!CONFLICTING_OVERLOADS!>fun rest(s: String)<!> {}
|
||||
|
||||
fun rest(l: Long) {}
|
||||
|
||||
@@ -45,11 +45,11 @@ fun <T : Int> kek(t: T) {}
|
||||
fun lol(a: Array<Int>) {}
|
||||
fun lol(a: Array<Boolean>) {}
|
||||
|
||||
<!CONFLICTING_OVERLOADS{LT}!><!CONFLICTING_OVERLOADS{PSI}!>fun <T> mem(t: T)<!> where T : () -> Boolean, T : String {}<!>
|
||||
<!CONFLICTING_OVERLOADS{LT}!><!CONFLICTING_OVERLOADS{PSI}!>fun <T> mem(t: T)<!> where T : String, T : () -> Boolean {}<!>
|
||||
<!CONFLICTING_OVERLOADS!>fun <T> mem(t: T)<!> where T : () -> Boolean, T : String {}
|
||||
<!CONFLICTING_OVERLOADS!>fun <T> mem(t: T)<!> where T : String, T : () -> Boolean {}
|
||||
|
||||
class M {
|
||||
<!REDECLARATION{LT}!>companion <!REDECLARATION{PSI}!>object<!> {}<!>
|
||||
companion <!REDECLARATION!>object<!> {}
|
||||
<!REDECLARATION!>val Companion = object : Any {}<!>
|
||||
}
|
||||
|
||||
|
||||
+3
-3
@@ -1,7 +1,7 @@
|
||||
<!CONSTRUCTOR_IN_INTERFACE{LT}!>interface <!CONSTRUCTOR_IN_INTERFACE{PSI}!>A(val s: String)<!><!>
|
||||
interface <!CONSTRUCTOR_IN_INTERFACE!>A(val s: String)<!>
|
||||
|
||||
<!CONSTRUCTOR_IN_INTERFACE{LT}!>interface <!CONSTRUCTOR_IN_INTERFACE{PSI}!>B constructor(val s: String)<!><!>
|
||||
interface <!CONSTRUCTOR_IN_INTERFACE!>B constructor(val s: String)<!>
|
||||
|
||||
interface C {
|
||||
<!CONSTRUCTOR_IN_INTERFACE{LT}!><!CONSTRUCTOR_IN_INTERFACE{PSI}!>constructor(val s: String)<!> {}<!>
|
||||
<!CONSTRUCTOR_IN_INTERFACE!>constructor(val s: String)<!> {}
|
||||
}
|
||||
|
||||
Vendored
+15
-15
@@ -2,14 +2,14 @@ class B
|
||||
class C
|
||||
|
||||
class A() {
|
||||
constructor(a: Int) : <!CYCLIC_CONSTRUCTOR_DELEGATION_CALL{LT}!><!CYCLIC_CONSTRUCTOR_DELEGATION_CALL{PSI}!>this<!>("test")<!> {}
|
||||
constructor(a: String) : <!CYCLIC_CONSTRUCTOR_DELEGATION_CALL{LT}!><!CYCLIC_CONSTRUCTOR_DELEGATION_CALL{PSI}!>this<!>(10)<!> {}
|
||||
constructor(a: Int) : <!CYCLIC_CONSTRUCTOR_DELEGATION_CALL!>this<!>("test") {}
|
||||
constructor(a: String) : <!CYCLIC_CONSTRUCTOR_DELEGATION_CALL!>this<!>(10) {}
|
||||
|
||||
constructor(a: Boolean) : <!CYCLIC_CONSTRUCTOR_DELEGATION_CALL{LT}!><!CYCLIC_CONSTRUCTOR_DELEGATION_CALL{PSI}!>this<!>('\n')<!> {}
|
||||
constructor(a: Char) : <!CYCLIC_CONSTRUCTOR_DELEGATION_CALL{LT}!><!CYCLIC_CONSTRUCTOR_DELEGATION_CALL{PSI}!>this<!>(0.0)<!> {}
|
||||
constructor(a: Double) : <!CYCLIC_CONSTRUCTOR_DELEGATION_CALL{LT}!><!CYCLIC_CONSTRUCTOR_DELEGATION_CALL{PSI}!>this<!>(false)<!> {}
|
||||
constructor(a: Boolean) : <!CYCLIC_CONSTRUCTOR_DELEGATION_CALL!>this<!>('\n') {}
|
||||
constructor(a: Char) : <!CYCLIC_CONSTRUCTOR_DELEGATION_CALL!>this<!>(0.0) {}
|
||||
constructor(a: Double) : <!CYCLIC_CONSTRUCTOR_DELEGATION_CALL!>this<!>(false) {}
|
||||
|
||||
constructor(b: B) : <!CYCLIC_CONSTRUCTOR_DELEGATION_CALL{LT}!><!CYCLIC_CONSTRUCTOR_DELEGATION_CALL{PSI}!>this<!>(3.14159265)<!> {}
|
||||
constructor(b: B) : <!CYCLIC_CONSTRUCTOR_DELEGATION_CALL!>this<!>(3.14159265) {}
|
||||
|
||||
constructor(c: C) : this() {}
|
||||
constructor(a: List<Int>) : this(C()) {}
|
||||
@@ -17,7 +17,7 @@ class A() {
|
||||
|
||||
class D {
|
||||
constructor(i: Boolean) {}
|
||||
constructor(i: Int) : <!CYCLIC_CONSTRUCTOR_DELEGATION_CALL{LT}!><!CYCLIC_CONSTRUCTOR_DELEGATION_CALL{PSI}!>this<!>(3)<!> {}
|
||||
constructor(i: Int) : <!CYCLIC_CONSTRUCTOR_DELEGATION_CALL!>this<!>(3) {}
|
||||
}
|
||||
|
||||
class E<T> {
|
||||
@@ -25,7 +25,7 @@ class E<T> {
|
||||
// selection of the proper constructor
|
||||
// but a type mismatch for the first
|
||||
// argument
|
||||
constructor(e: T, i: Int) : <!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>this<!>(i, 10)<!> {}
|
||||
constructor(e: T, i: Int) : <!INAPPLICABLE_CANDIDATE!>this<!>(i, 10) {}
|
||||
}
|
||||
|
||||
class I<T> {
|
||||
@@ -33,7 +33,7 @@ class I<T> {
|
||||
// selection of the proper constructor
|
||||
// but a type mismatch for the first
|
||||
// argument
|
||||
constructor(e: T, i: Int) : <!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>this<!>(i, 10)<!>
|
||||
constructor(e: T, i: Int) : <!INAPPLICABLE_CANDIDATE!>this<!>(i, 10)
|
||||
}
|
||||
|
||||
class J<T> {
|
||||
@@ -42,20 +42,20 @@ class J<T> {
|
||||
}
|
||||
|
||||
class F(s: String) {
|
||||
<!PRIMARY_CONSTRUCTOR_DELEGATION_CALL_EXPECTED{PSI}!>constructor(i: Boolean)<!><!PRIMARY_CONSTRUCTOR_DELEGATION_CALL_EXPECTED{LT}!><!> {}
|
||||
constructor(i: Int) : <!CYCLIC_CONSTRUCTOR_DELEGATION_CALL{LT}!><!CYCLIC_CONSTRUCTOR_DELEGATION_CALL{PSI}!>this<!>(3)<!> {}
|
||||
<!PRIMARY_CONSTRUCTOR_DELEGATION_CALL_EXPECTED!>constructor(i: Boolean)<!> {}
|
||||
constructor(i: Int) : <!CYCLIC_CONSTRUCTOR_DELEGATION_CALL!>this<!>(3) {}
|
||||
}
|
||||
|
||||
class G(x: Int) {
|
||||
<!PRIMARY_CONSTRUCTOR_DELEGATION_CALL_EXPECTED{PSI}!>constructor()<!><!PRIMARY_CONSTRUCTOR_DELEGATION_CALL_EXPECTED{LT}!><!> {}
|
||||
<!PRIMARY_CONSTRUCTOR_DELEGATION_CALL_EXPECTED!>constructor()<!> {}
|
||||
}
|
||||
|
||||
class H(x: Int) {
|
||||
<!PRIMARY_CONSTRUCTOR_DELEGATION_CALL_EXPECTED{PSI}!>constructor()<!><!PRIMARY_CONSTRUCTOR_DELEGATION_CALL_EXPECTED{LT}!><!>
|
||||
<!PRIMARY_CONSTRUCTOR_DELEGATION_CALL_EXPECTED!>constructor()<!>
|
||||
}
|
||||
|
||||
class K(x: Int) {
|
||||
constructor() : <!CYCLIC_CONSTRUCTOR_DELEGATION_CALL{LT}!><!CYCLIC_CONSTRUCTOR_DELEGATION_CALL{PSI}!>this<!>()<!> {}
|
||||
constructor() : <!CYCLIC_CONSTRUCTOR_DELEGATION_CALL!>this<!>() {}
|
||||
}
|
||||
|
||||
class M {
|
||||
@@ -63,5 +63,5 @@ class M {
|
||||
}
|
||||
|
||||
class U : M {
|
||||
<!INAPPLICABLE_CANDIDATE{PSI}!>constructor()<!><!INAPPLICABLE_CANDIDATE{LT}!><!>
|
||||
<!INAPPLICABLE_CANDIDATE!>constructor()<!>
|
||||
}
|
||||
|
||||
Vendored
+1
-1
@@ -1,6 +1,6 @@
|
||||
enum class A {
|
||||
A(1), B(2), C("test");
|
||||
|
||||
constructor(x: Int) : <!DELEGATION_SUPER_CALL_IN_ENUM_CONSTRUCTOR{LT}!><!DELEGATION_SUPER_CALL_IN_ENUM_CONSTRUCTOR{PSI}!>super<!>()<!>
|
||||
constructor(x: Int) : <!DELEGATION_SUPER_CALL_IN_ENUM_CONSTRUCTOR!>super<!>()
|
||||
constructor(t: String) : this(10)
|
||||
}
|
||||
|
||||
+3
-3
@@ -3,16 +3,16 @@ class A(x: Int) {
|
||||
}
|
||||
|
||||
class B : A {
|
||||
<!EXPLICIT_DELEGATION_CALL_REQUIRED, NONE_APPLICABLE{PSI}!>constructor()<!><!NONE_APPLICABLE{LT}!><!>
|
||||
<!EXPLICIT_DELEGATION_CALL_REQUIRED, NONE_APPLICABLE!>constructor()<!>
|
||||
constructor(z: String) : this()
|
||||
}
|
||||
|
||||
<!SUPERTYPE_INITIALIZED_WITHOUT_PRIMARY_CONSTRUCTOR!>class C : A(20) {
|
||||
<!EXPLICIT_DELEGATION_CALL_REQUIRED, NONE_APPLICABLE{PSI}!>constructor()<!><!NONE_APPLICABLE{LT}!><!>
|
||||
<!EXPLICIT_DELEGATION_CALL_REQUIRED, NONE_APPLICABLE!>constructor()<!>
|
||||
constructor(z: String) : this()
|
||||
}<!>
|
||||
|
||||
class D() : A(20) {
|
||||
<!NONE_APPLICABLE{PSI}, PRIMARY_CONSTRUCTOR_DELEGATION_CALL_EXPECTED{PSI}!>constructor(x: Int)<!><!NONE_APPLICABLE{LT}, PRIMARY_CONSTRUCTOR_DELEGATION_CALL_EXPECTED{LT}!><!>
|
||||
<!NONE_APPLICABLE, PRIMARY_CONSTRUCTOR_DELEGATION_CALL_EXPECTED!>constructor(x: Int)<!>
|
||||
constructor(z: String) : this()
|
||||
}
|
||||
|
||||
+2
-2
@@ -7,10 +7,10 @@ class A {
|
||||
class B(other: B = <!NO_THIS!>this<!>)
|
||||
|
||||
class C() {
|
||||
constructor(x: Int) : <!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>this<!>({
|
||||
constructor(x: Int) : <!INAPPLICABLE_CANDIDATE!>this<!>({
|
||||
val a = 10
|
||||
<!INSTANCE_ACCESS_BEFORE_SUPER_CALL!>this<!>
|
||||
})<!> {}
|
||||
}) {}
|
||||
}
|
||||
|
||||
class D {
|
||||
|
||||
+4
-4
@@ -6,19 +6,19 @@ object A {
|
||||
interface X
|
||||
|
||||
val a = object : Any() {
|
||||
<!LOCAL_OBJECT_NOT_ALLOWED{LT}!><!LOCAL_OBJECT_NOT_ALLOWED{PSI}!>object D<!> {
|
||||
<!LOCAL_OBJECT_NOT_ALLOWED!>object D<!> {
|
||||
<!LOCAL_OBJECT_NOT_ALLOWED!>object G<!>
|
||||
<!LOCAL_INTERFACE_NOT_ALLOWED!>interface Z<!>
|
||||
}<!>
|
||||
}
|
||||
|
||||
<!LOCAL_INTERFACE_NOT_ALLOWED!>interface Y<!>
|
||||
}
|
||||
|
||||
fun b() {
|
||||
<!LOCAL_OBJECT_NOT_ALLOWED{LT}!><!LOCAL_OBJECT_NOT_ALLOWED{PSI}!>object E<!> {
|
||||
<!LOCAL_OBJECT_NOT_ALLOWED!>object E<!> {
|
||||
<!LOCAL_OBJECT_NOT_ALLOWED!>object F<!>
|
||||
<!LOCAL_INTERFACE_NOT_ALLOWED!>interface M<!>
|
||||
}<!>
|
||||
}
|
||||
|
||||
<!LOCAL_INTERFACE_NOT_ALLOWED!>interface N<!>
|
||||
|
||||
|
||||
+6
-6
@@ -1,11 +1,11 @@
|
||||
class A {
|
||||
<!REDECLARATION{LT}!>companion <!REDECLARATION{PSI}!>object<!> {
|
||||
companion <!REDECLARATION!>object<!> {
|
||||
|
||||
}<!>
|
||||
}
|
||||
|
||||
<!MANY_COMPANION_OBJECTS{LT}, REDECLARATION{LT}!>companion <!MANY_COMPANION_OBJECTS{PSI}, REDECLARATION{PSI}!>object<!> {
|
||||
companion <!MANY_COMPANION_OBJECTS, REDECLARATION!>object<!> {
|
||||
|
||||
}<!>
|
||||
}
|
||||
}
|
||||
|
||||
class B {
|
||||
@@ -13,7 +13,7 @@ class B {
|
||||
|
||||
}
|
||||
|
||||
<!MANY_COMPANION_OBJECTS{LT}!>companion <!MANY_COMPANION_OBJECTS{PSI}!>object B<!> {
|
||||
companion <!MANY_COMPANION_OBJECTS!>object B<!> {
|
||||
|
||||
}<!>
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -28,9 +28,9 @@ sealed class P {
|
||||
|
||||
class K : P()
|
||||
|
||||
<!REDECLARATION{LT}!><!REDECLARATION{PSI}!>object B<!> {
|
||||
<!REDECLARATION!>object B<!> {
|
||||
class I : <!SEALED_SUPERTYPE!>P<!>()
|
||||
}<!>
|
||||
}
|
||||
|
||||
fun test() {
|
||||
class L : <!SEALED_SUPERTYPE_IN_LOCAL_CLASS!>P<!>()
|
||||
|
||||
+7
-7
@@ -1,15 +1,15 @@
|
||||
<!TYPE_PARAMETERS_IN_OBJECT{LT}!><!TYPE_PARAMETERS_IN_OBJECT{PSI}!>object A<!><T, K : T> {
|
||||
<!TYPE_PARAMETERS_IN_OBJECT{LT}!><!TYPE_PARAMETERS_IN_OBJECT{PSI}!>object B<!><L><!>
|
||||
}<!>
|
||||
<!TYPE_PARAMETERS_IN_OBJECT!>object A<!><T, K : T> {
|
||||
<!TYPE_PARAMETERS_IN_OBJECT!>object B<!><L>
|
||||
}
|
||||
|
||||
class N {
|
||||
<!TYPE_PARAMETERS_IN_OBJECT{LT}!>companion <!TYPE_PARAMETERS_IN_OBJECT{PSI}!>object<!><T> {
|
||||
companion <!TYPE_PARAMETERS_IN_OBJECT!>object<!><T> {
|
||||
|
||||
}<!>
|
||||
}
|
||||
}
|
||||
|
||||
fun test() {
|
||||
<!LOCAL_OBJECT_NOT_ALLOWED{LT}, TYPE_PARAMETERS_IN_OBJECT{LT}!><!LOCAL_OBJECT_NOT_ALLOWED{PSI}, TYPE_PARAMETERS_IN_OBJECT{PSI}!>object M<!><H> {
|
||||
<!LOCAL_OBJECT_NOT_ALLOWED, TYPE_PARAMETERS_IN_OBJECT!>object M<!><H> {
|
||||
|
||||
}<!>
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
annotation class A(
|
||||
<!VAR_ANNOTATION_PARAMETER{LT}!><!VAR_ANNOTATION_PARAMETER{PSI}!>var<!> a: Int<!>,
|
||||
<!VAR_ANNOTATION_PARAMETER!>var<!> a: Int,
|
||||
<!MISSING_VAL_ON_ANNOTATION_PARAMETER!>b: String<!>
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user