提交 e1802fde 编写于 作者: D Dmitriy Novozhilov

[TD] Update test data after previous commit

上级 49d9b859
open class A open class A
class B : A() class B : A()
\ No newline at end of file
...@@ -6,4 +6,4 @@ typealias TA = A ...@@ -6,4 +6,4 @@ typealias TA = A
class B : TA() { class B : TA() {
class NestedInB : Nested() class NestedInB : Nested()
} }
\ No newline at end of file
...@@ -10,4 +10,4 @@ abstract class My { ...@@ -10,4 +10,4 @@ abstract class My {
class Your : My() { class Your : My() {
class NestedThree : NestedOne() class NestedThree : NestedOne()
} }
\ No newline at end of file
...@@ -3,4 +3,4 @@ package p ...@@ -3,4 +3,4 @@ package p
open class A open class A
class B : A() class B : A()
\ No newline at end of file
...@@ -15,5 +15,5 @@ class B : A() { ...@@ -15,5 +15,5 @@ class B : A() {
} }
fun test(b: B) { fun test(b: B) {
b.<!HIDDEN!>foo<!>("") b.<!HIDDEN{LT}!><!HIDDEN{PSI}!>foo<!>("")<!>
} }
...@@ -8,19 +8,19 @@ fun test() { ...@@ -8,19 +8,19 @@ fun test() {
foo(1, 2.0, true) foo(1, 2.0, true)
foo(1, third = true) foo(1, third = true)
<!INAPPLICABLE_CANDIDATE!>foo<!>() <!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>foo<!>()<!>
<!INAPPLICABLE_CANDIDATE!>foo<!>(0, 0.0, false, "") <!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>foo<!>(0, 0.0, false, "")<!>
bar(1, third = true) bar(1, third = true)
bar(1, 2.0, true) bar(1, 2.0, true)
bar(1, 2.0, true, "my") bar(1, 2.0, true, "my")
<!INAPPLICABLE_CANDIDATE!>bar<!>(1, true) <!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>bar<!>(1, true)<!>
baz(1) baz(1)
baz(1, "my", "yours") baz(1, "my", "yours")
baz(1, z = true) baz(1, z = true)
<!INAPPLICABLE_CANDIDATE!>baz<!>(0, "", false) <!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>baz<!>(0, "", false)<!>
} }
...@@ -15,8 +15,8 @@ fun foo(a: A) { ...@@ -15,8 +15,8 @@ fun foo(a: A) {
a.foo() a.foo()
a.foo(1) a.foo(1)
a.<!INAPPLICABLE_CANDIDATE!>bar<!>() a.<!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>bar<!>()<!>
a.<!INAPPLICABLE_CANDIDATE!>bar<!>("") a.<!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>bar<!>("")<!>
a.bar(y = 1) a.bar(y = 1)
a.bar("", 2) a.bar("", 2)
} }
...@@ -2,4 +2,4 @@ fun test( ...@@ -2,4 +2,4 @@ fun test(
val f: String.() -> Int = { length } val f: String.() -> Int = { length }
): Int { ): Int {
return "".f() return "".f()
} }
\ No newline at end of file
...@@ -4,4 +4,4 @@ fun test() { ...@@ -4,4 +4,4 @@ fun test() {
foo { foo {
this + it this + it
} }
} }
\ No newline at end of file
...@@ -17,9 +17,9 @@ fun test_1() { ...@@ -17,9 +17,9 @@ fun test_1() {
} }
fun test_2() { fun test_2() {
<!INAPPLICABLE_CANDIDATE!>takeInt<!>(10000000000) <!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>takeInt<!>(10000000000)<!>
takeLong(10000000000) takeLong(10000000000)
<!INAPPLICABLE_CANDIDATE!>takeByte<!>(1000) <!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>takeByte<!>(1000)<!>
} }
fun test_3() { fun test_3() {
...@@ -35,8 +35,8 @@ fun test_4() { ...@@ -35,8 +35,8 @@ fun test_4() {
} }
fun test_5() { fun test_5() {
<!INAPPLICABLE_CANDIDATE!>takeString<!>(1) <!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>takeString<!>(1)<!>
<!INAPPLICABLE_CANDIDATE!>takeString<!>(run { 1 }) <!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>takeString<!>(run { 1 })<!>
} }
annotation class Ann(val x: Byte) annotation class Ann(val x: Byte)
......
...@@ -6,4 +6,4 @@ class My(var x: Int) { ...@@ -6,4 +6,4 @@ class My(var x: Int) {
fun copy() = My(x) fun copy() = My(x)
} }
fun testInvoke(): Int = My(13)() fun testInvoke(): Int = My(13)()
\ No newline at end of file
...@@ -13,6 +13,6 @@ fun takeOutA(array: Array<out A>) {} ...@@ -13,6 +13,6 @@ fun takeOutA(array: Array<out A>) {}
fun test(array: Array<B>) { fun test(array: Array<B>) {
A.take(array) A.take(array)
<!INAPPLICABLE_CANDIDATE!>takeA<!>(array) <!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>takeA<!>(array)<!>
takeOutA(array) takeOutA(array)
} }
\ No newline at end of file
...@@ -10,8 +10,8 @@ fun test() { ...@@ -10,8 +10,8 @@ fun test() {
foo({}) foo({})
// Bad // Bad
<!INAPPLICABLE_CANDIDATE!>foo<!>(1) {} <!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>foo<!>(1) {}<!>
<!INAPPLICABLE_CANDIDATE!>foo<!>(f = {}) {} <!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>foo<!>(f = {}) {}<!>
// OK // OK
bar(1) {} bar(1) {}
...@@ -20,15 +20,15 @@ fun test() { ...@@ -20,15 +20,15 @@ fun test() {
bar(x = 1, f = {}) bar(x = 1, f = {})
// Bad // Bad
<!INAPPLICABLE_CANDIDATE!>bar<!> {} <!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>bar<!> {}<!>
<!INAPPLICABLE_CANDIDATE!>bar<!>({}) <!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>bar<!>({})<!>
// OK // OK
baz(other = false, f = {}) baz(other = false, f = {})
baz({}, false) baz({}, false)
// Bad // Bad
<!INAPPLICABLE_CANDIDATE!>baz<!> {} <!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>baz<!> {}<!>
<!INAPPLICABLE_CANDIDATE!>baz<!>() {} <!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>baz<!>() {}<!>
<!INAPPLICABLE_CANDIDATE!>baz<!>(other = false) {} <!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>baz<!>(other = false) {}<!>
} }
\ No newline at end of file
...@@ -20,4 +20,4 @@ fun test(ordinal: Int) { ...@@ -20,4 +20,4 @@ fun test(ordinal: Int) {
} }
} }
} }
} }
\ No newline at end of file
...@@ -25,4 +25,4 @@ fun test() { ...@@ -25,4 +25,4 @@ fun test() {
val processor = AdapterProcessor<PsiMethod, PsiClass>( val processor = AdapterProcessor<PsiMethod, PsiClass>(
Function { method: PsiMethod? -> method?.containingClass } Function { method: PsiMethod? -> method?.containingClass }
) )
} }
\ No newline at end of file
fun <R> materialize(): R = null!! fun <R> materialize(): R = null!!
fun test_1() { fun test_1() {
<!UNRESOLVED_REFERENCE!>myRun<!> { <!UNRESOLVED_REFERENCE{LT}!><!UNRESOLVED_REFERENCE{PSI}!>myRun<!> {
val x = 1 val x = 1
x * 2 x * 2
} }<!>
} }
fun test_2() { fun test_2() {
<!UNRESOLVED_REFERENCE!>myRun<!> { <!UNRESOLVED_REFERENCE{LT}!><!UNRESOLVED_REFERENCE{PSI}!>myRun<!> {
materialize() materialize()
} }<!>
} }
\ No newline at end of file
...@@ -31,33 +31,33 @@ fun test_3() { ...@@ -31,33 +31,33 @@ fun test_3() {
fun takeByte(b: Byte) {} fun takeByte(b: Byte) {}
fun test_4() { fun test_4() {
<!INAPPLICABLE_CANDIDATE!>takeByte<!>(1 + 1) <!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>takeByte<!>(1 + 1)<!>
<!INAPPLICABLE_CANDIDATE!>takeByte<!>(1 + 127) <!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>takeByte<!>(1 + 127)<!>
<!INAPPLICABLE_CANDIDATE!>takeByte<!>(1 - 1) <!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>takeByte<!>(1 - 1)<!>
<!INAPPLICABLE_CANDIDATE!>takeByte<!>(-100 - 100) <!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>takeByte<!>(-100 - 100)<!>
<!INAPPLICABLE_CANDIDATE!>takeByte<!>(10 * 10) <!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>takeByte<!>(10 * 10)<!>
<!INAPPLICABLE_CANDIDATE!>takeByte<!>(100 * 100) <!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>takeByte<!>(100 * 100)<!>
<!UNRESOLVED_REFERENCE!>taleByte<!>(10 / 10) <!UNRESOLVED_REFERENCE{LT}!><!UNRESOLVED_REFERENCE{PSI}!>taleByte<!>(10 / 10)<!>
<!INAPPLICABLE_CANDIDATE!>takeByte<!>(100 % 10) <!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>takeByte<!>(100 % 10)<!>
<!INAPPLICABLE_CANDIDATE!>takeByte<!>(1000 % 10) <!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>takeByte<!>(1000 % 10)<!>
<!INAPPLICABLE_CANDIDATE!>takeByte<!>(1000 and 100) <!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>takeByte<!>(1000 and 100)<!>
<!INAPPLICABLE_CANDIDATE!>takeByte<!>(128 and 511) <!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>takeByte<!>(128 and 511)<!>
<!INAPPLICABLE_CANDIDATE!>takeByte<!>(100 or 100) <!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>takeByte<!>(100 or 100)<!>
<!INAPPLICABLE_CANDIDATE!>takeByte<!>(1000 or 0) <!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>takeByte<!>(1000 or 0)<!>
<!INAPPLICABLE_CANDIDATE!>takeByte<!>(511 xor 511) <!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>takeByte<!>(511 xor 511)<!>
<!INAPPLICABLE_CANDIDATE!>takeByte<!>(512 xor 511) <!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>takeByte<!>(512 xor 511)<!>
} }
fun test_5() { fun test_5() {
takeByte(-1) takeByte(-1)
takeByte(+1) takeByte(+1)
<!INAPPLICABLE_CANDIDATE!>takeByte<!>(1.inv()) <!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>takeByte<!>(1.inv())<!>
} }
fun test_6() { fun test_6() {
<!INAPPLICABLE_CANDIDATE!>takeByte<!>(run { 127 + 1 }) <!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>takeByte<!>(run { 127 + 1 })<!>
<!INAPPLICABLE_CANDIDATE!>takeByte<!>(1 + run { 1 }) <!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>takeByte<!>(1 + run { 1 })<!>
<!INAPPLICABLE_CANDIDATE!>takeByte<!>(run { 1 + 1 }) <!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>takeByte<!>(run { 1 + 1 })<!>
1 + 1 1 + 1
run { 1 } run { 1 }
1 + run { 1 } 1 + run { 1 }
......
...@@ -14,4 +14,4 @@ fun takeInt(x: Int) {} ...@@ -14,4 +14,4 @@ fun takeInt(x: Int) {}
fun test(d: D) { fun test(d: D) {
val x = d.foo() val x = d.foo()
takeInt(x) takeInt(x)
} }
\ No newline at end of file
...@@ -5,4 +5,4 @@ interface A { ...@@ -5,4 +5,4 @@ interface A {
fun test(a: A) { fun test(a: A) {
a.foo { true } a.foo { true }
} }
\ No newline at end of file
...@@ -7,11 +7,11 @@ fun test() { ...@@ -7,11 +7,11 @@ fun test() {
foo(1, second = 3.14, third = false, fourth = "!?") foo(1, second = 3.14, third = false, fourth = "!?")
foo(third = false, second = 2.71, fourth = "?!", first = 0) foo(third = false, second = 2.71, fourth = "?!", first = 0)
<!INAPPLICABLE_CANDIDATE!>foo<!>() <!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>foo<!>()<!>
<!INAPPLICABLE_CANDIDATE!>foo<!>(0.0, false, 0, "") <!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>foo<!>(0.0, false, 0, "")<!>
foo(1, 2.0, third = true, "") foo(1, 2.0, third = true, "")
<!INAPPLICABLE_CANDIDATE!>foo<!>(second = 0.0, first = 0, fourth = "") <!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>foo<!>(second = 0.0, first = 0, fourth = "")<!>
<!INAPPLICABLE_CANDIDATE!>foo<!>(first = 0.0, second = 0, third = "", fourth = false) <!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>foo<!>(first = 0.0, second = 0, third = "", fourth = false)<!>
<!INAPPLICABLE_CANDIDATE!>foo<!>(first = 0, second = 0.0, third = false, fourth = "", first = 1) <!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>foo<!>(first = 0, second = 0.0, third = false, fourth = "", first = 1)<!>
<!INAPPLICABLE_CANDIDATE!>foo<!>(0, 0.0, false, foth = "") <!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>foo<!>(0, 0.0, false, foth = "")<!>
} }
\ No newline at end of file
...@@ -4,4 +4,4 @@ fun foo(s: String) {} ...@@ -4,4 +4,4 @@ fun foo(s: String) {}
fun test(a: A) { fun test(a: A) {
foo("$a") foo("$a")
} }
\ No newline at end of file
...@@ -10,4 +10,4 @@ fun test() { ...@@ -10,4 +10,4 @@ fun test() {
foo() foo()
} }
} }
} }
\ No newline at end of file
...@@ -7,11 +7,11 @@ fun test() { ...@@ -7,11 +7,11 @@ fun test() {
foo(1, "my", "yours") foo(1, "my", "yours")
foo(1, *arrayOf("my", "yours")) foo(1, *arrayOf("my", "yours"))
<!INAPPLICABLE_CANDIDATE!>foo<!>("") <!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>foo<!>("")<!>
<!INAPPLICABLE_CANDIDATE!>foo<!>(1, 2) <!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>foo<!>(1, 2)<!>
bar(1, z = true, y = *arrayOf("my", "yours")) bar(1, z = true, y = *arrayOf("my", "yours"))
<!INAPPLICABLE_CANDIDATE!>bar<!>(0, z = false, y = "", y = "other") <!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>bar<!>(0, z = false, y = "", y = "other")<!>
<!INAPPLICABLE_CANDIDATE!>bar<!>(0, "", true) <!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>bar<!>(0, "", true)<!>
} }
...@@ -6,4 +6,4 @@ fun foo(vararg arg: Base) {} ...@@ -6,4 +6,4 @@ fun foo(vararg arg: Base) {}
fun bar(base: Array<Base>, sub: Array<Sub>) { fun bar(base: Array<Base>, sub: Array<Sub>) {
foo(*base) foo(*base)
foo(*sub) foo(*sub)
} }
\ No newline at end of file
...@@ -28,4 +28,4 @@ fun test_2(a: A<C>) { ...@@ -28,4 +28,4 @@ fun test_2(a: A<C>) {
fun test_3(a: A<D>) { fun test_3(a: A<D>) {
a[0] = D() // set a[0] = D() // set
} }
\ No newline at end of file
...@@ -33,4 +33,4 @@ fun test_3(a: A<D>) { ...@@ -33,4 +33,4 @@ fun test_3(a: A<D>) {
fun test_4(b: B) { fun test_4(b: B) {
<!UNRESOLVED_REFERENCE!><!UNRESOLVED_REFERENCE!>b[0]<!> += B()<!> // unresolved <!UNRESOLVED_REFERENCE!><!UNRESOLVED_REFERENCE!>b[0]<!> += B()<!> // unresolved
} }
\ No newline at end of file
...@@ -11,11 +11,11 @@ class A { ...@@ -11,11 +11,11 @@ class A {
import foo.A as B import foo.A as B
fun test_1() { fun test_1() {
val a = <!UNRESOLVED_REFERENCE!>A<!>() val a = <!UNRESOLVED_REFERENCE{LT}!><!UNRESOLVED_REFERENCE{PSI}!>A<!>()<!>
val b = B() // should be OK val b = B() // should be OK
val c: B = <!UNRESOLVED_REFERENCE!>A<!>() val c: B = <!UNRESOLVED_REFERENCE{LT}!><!UNRESOLVED_REFERENCE{PSI}!>A<!>()<!>
} }
fun test_2(b: B) { fun test_2(b: B) {
b.foo() b.foo()
} }
\ No newline at end of file
...@@ -2,4 +2,4 @@ abstract class MyStringList : List<String> ...@@ -2,4 +2,4 @@ abstract class MyStringList : List<String>
abstract class MyMutableStringList : MutableList<String> abstract class MyMutableStringList : MutableList<String>
fun List<String>.convert(): MyStringList = this as MyStringList fun List<String>.convert(): MyStringList = this as MyStringList
fun ret(l: MutableList<String>): MyMutableStringList = l as MyMutableStringList fun ret(l: MutableList<String>): MyMutableStringList = l as MyMutableStringList
\ No newline at end of file
...@@ -9,11 +9,11 @@ fun bar(x: B) {} ...@@ -9,11 +9,11 @@ fun bar(x: B) {}
fun test(c: C) { fun test(c: C) {
// Argument mapping error // Argument mapping error
<!INAPPLICABLE_CANDIDATE!>foo<!>("") <!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>foo<!>("")<!>
// Ambiguity // Ambiguity
<!AMBIGUITY!>bar<!>(c) <!AMBIGUITY{LT}!><!AMBIGUITY{PSI}!>bar<!>(c)<!>
// Unresolved reference // Unresolved reference
<!UNRESOLVED_REFERENCE!>baz<!>() <!UNRESOLVED_REFERENCE{LT}!><!UNRESOLVED_REFERENCE{PSI}!>baz<!>()<!>
} }
\ No newline at end of file
...@@ -26,4 +26,4 @@ class Outer<E> { ...@@ -26,4 +26,4 @@ class Outer<E> {
} }
fun bar(i: Inner) {} fun bar(i: Inner) {}
} }
\ No newline at end of file
...@@ -9,6 +9,6 @@ fun main1() { ...@@ -9,6 +9,6 @@ fun main1() {
} }
fun main2() { fun main2() {
{ "" }.<!INAPPLICABLE_CANDIDATE!>bar<!>() { "" }.<!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>bar<!>()<!>
"".bar() "".bar()
} }
...@@ -4,4 +4,4 @@ val y = 2 as Any ...@@ -4,4 +4,4 @@ val y = 2 as Any
val f = fun() = 3 as Any val f = fun() = 3 as Any
val g = {} val g = {}
val h: (String) -> Boolean = { _ -> false } val h: (String) -> Boolean = { _ -> false }
val hError = { _ -> true } val hError = { _ -> true }
\ No newline at end of file
...@@ -13,4 +13,4 @@ fun foo(b: Boolean) { ...@@ -13,4 +13,4 @@ fun foo(b: Boolean) {
bar() bar()
} }
fun bar() {} fun bar() {}
\ No newline at end of file
...@@ -45,4 +45,4 @@ fun test_8(b: Boolean) { ...@@ -45,4 +45,4 @@ fun test_8(b: Boolean) {
if (true && b) { if (true && b) {
1 1
} }
} }
\ No newline at end of file
...@@ -19,4 +19,4 @@ internal fun AutoCloseable?.closeFinally(cause: Throwable?) = when { ...@@ -19,4 +19,4 @@ internal fun AutoCloseable?.closeFinally(cause: Throwable?) = when {
inline fun <reified T : Any> List<*>.firstIsInstanceOrNull(): T? { inline fun <reified T : Any> List<*>.firstIsInstanceOrNull(): T? {
for (element in this) if (element is T) return element for (element in this) if (element is T) return element
return null return null
} }
\ No newline at end of file
...@@ -9,4 +9,4 @@ fun test_2(x: Int) { ...@@ -9,4 +9,4 @@ fun test_2(x: Int) {
fun test_3(x: Int) { fun test_3(x: Int) {
when (val y = x) {} when (val y = x) {}
} }
\ No newline at end of file
...@@ -19,7 +19,7 @@ fun test_2(x: Any, y: Any) { ...@@ -19,7 +19,7 @@ fun test_2(x: Any, y: Any) {
val a = select( val a = select(
id( id(
run { run {
y.<!UNRESOLVED_REFERENCE!>inc<!>() // Bad y.<!UNRESOLVED_REFERENCE{LT}!><!UNRESOLVED_REFERENCE{PSI}!>inc<!>()<!> // Bad
x as Int x as Int
} }
), ),
...@@ -39,14 +39,14 @@ fun test_3(x: Any, y: Any) { ...@@ -39,14 +39,14 @@ fun test_3(x: Any, y: Any) {
val a = select( val a = select(
id( id(
run { run {
y.<!UNRESOLVED_REFERENCE!>inc<!>() // Bad y.<!UNRESOLVED_REFERENCE{LT}!><!UNRESOLVED_REFERENCE{PSI}!>inc<!>()<!> // Bad
x as Int x as Int
materialize() materialize()
} }
), ),
run { run {
y as Int y as Int
x.<!UNRESOLVED_REFERENCE!>inc<!>() // Bad x.<!UNRESOLVED_REFERENCE{LT}!><!UNRESOLVED_REFERENCE{PSI}!>inc<!>()<!> // Bad
y.inc() // OK y.inc() // OK
1 1
} }
...@@ -60,19 +60,19 @@ fun test_4(x: Any, y: Any) { ...@@ -60,19 +60,19 @@ fun test_4(x: Any, y: Any) {
val a = select( val a = select(
id( id(
myRun { myRun {
y.<!UNRESOLVED_REFERENCE!>inc<!>() // Bad y.<!UNRESOLVED_REFERENCE{LT}!><!UNRESOLVED_REFERENCE{PSI}!>inc<!>()<!> // Bad
x as Int x as Int
} }
), ),
y as Int, y as Int,
myRun { myRun {
x.<!UNRESOLVED_REFERENCE!>inc<!>() // Bad x.<!UNRESOLVED_REFERENCE{LT}!><!UNRESOLVED_REFERENCE{PSI}!>inc<!>()<!> // Bad
y.inc() // OK y.inc() // OK
1 1
} }
) )
<!INAPPLICABLE_CANDIDATE!>takeInt<!>(x) // Bad <!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>takeInt<!>(x)<!> // Bad
takeInt(y) // OK takeInt(y) // OK
takeInt(a) // Bad takeInt(a) // Bad
} }
...@@ -90,4 +90,4 @@ fun test_6() { ...@@ -90,4 +90,4 @@ fun test_6() {
} }
} }
) )
} }
\ No newline at end of file
...@@ -11,4 +11,4 @@ class Bar { ...@@ -11,4 +11,4 @@ class Bar {
throw Exception() throw Exception()
val y = 2 val y = 2
} }
} }
\ No newline at end of file
...@@ -11,4 +11,4 @@ class C(a: A, b: B) { ...@@ -11,4 +11,4 @@ class C(a: A, b: B) {
C(a, it) C(a, it)
} }
} }
} }
\ No newline at end of file
...@@ -15,7 +15,7 @@ fun test_2(x: Int?) { ...@@ -15,7 +15,7 @@ fun test_2(x: Int?) {
} else { } else {
x x
} }
y.<!INAPPLICABLE_CANDIDATE!>inc<!>() y.<!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>inc<!>()<!>
} }
fun test_3(x: Int?) { fun test_3(x: Int?) {
...@@ -50,4 +50,4 @@ fun test_6() { ...@@ -50,4 +50,4 @@ fun test_6() {
run { run {
return@run return@run
} }
} }
\ No newline at end of file
...@@ -65,4 +65,4 @@ fun testDoWhileFalse() { ...@@ -65,4 +65,4 @@ fun testDoWhileFalse() {
1 1
} while (false) } while (false)
1 1
} }
\ No newline at end of file
...@@ -6,4 +6,4 @@ class B(val s: String) : A(s.let { { it } }) { ...@@ -6,4 +6,4 @@ class B(val s: String) : A(s.let { { it } }) {
fun foo() { fun foo() {
foo() foo()
} }
} }
\ No newline at end of file
...@@ -3,4 +3,4 @@ inline fun foo(vararg x: Any) {} ...@@ -3,4 +3,4 @@ inline fun foo(vararg x: Any) {}
fun test(a: Any, b: Any, c: Any) { fun test(a: Any, b: Any, c: Any) {
foo(a, { "" }, b) foo(a, { "" }, b)
} }
\ No newline at end of file
...@@ -40,4 +40,4 @@ val x4 = try { ...@@ -40,4 +40,4 @@ val x4 = try {
2 2
} finally { } finally {
0 0
} }
\ No newline at end of file
...@@ -19,4 +19,4 @@ fun test_2() { ...@@ -19,4 +19,4 @@ fun test_2() {
fun test_3() { fun test_3() {
val x = run { return } val x = run { return }
} }
\ No newline at end of file
...@@ -5,4 +5,4 @@ fun test() { ...@@ -5,4 +5,4 @@ fun test() {
val x = 1 val x = 1
val y = x + 1 val y = x + 1
foo() foo()
} }
\ No newline at end of file
...@@ -31,4 +31,4 @@ fun test_3(b: Boolean) { ...@@ -31,4 +31,4 @@ fun test_3(b: Boolean) {
val y = 2 val y = 2
} }
val z = 3 val z = 3
} }
\ No newline at end of file
...@@ -15,4 +15,4 @@ fun test_2(x: Any?) { ...@@ -15,4 +15,4 @@ fun test_2(x: Any?) {
if (x is A && x is B) { if (x is A && x is B) {
x is A x is A
} }
} }
\ No newline at end of file
...@@ -14,4 +14,4 @@ abstract class Another { ...@@ -14,4 +14,4 @@ abstract class Another {
} }
abstract val x: InCompanion abstract val x: InCompanion
} }
\ No newline at end of file
...@@ -15,4 +15,4 @@ class Derived : Base() { ...@@ -15,4 +15,4 @@ class Derived : Base() {
val dd: DerivedNested = DerivedNested() val dd: DerivedNested = DerivedNested()
} }
} }
} }
\ No newline at end of file
...@@ -24,4 +24,4 @@ typealias DDD = C ...@@ -24,4 +24,4 @@ typealias DDD = C
class CKt : QQQ, DDD { class CKt : QQQ, DDD {
constructor(s: String) : super(s) constructor(s: String) : super(s)
} }
\ No newline at end of file
...@@ -5,4 +5,4 @@ fun test(some: Some) { ...@@ -5,4 +5,4 @@ fun test(some: Some) {
val another = some.copy(x = 123) val another = some.copy(x = 123)
val same = some.copy() val same = some.copy()
val different = some.copy(456, "456") val different = some.copy(456, "456")
} }
\ No newline at end of file
...@@ -20,4 +20,4 @@ fun foo(element: PsiElement, usages: Array<UsageInfo>) { ...@@ -20,4 +20,4 @@ fun foo(element: PsiElement, usages: Array<UsageInfo>) {
val adjusted = if (element is KtParameter) usages.filterNot { val adjusted = if (element is KtParameter) usages.filterNot {
it.usage is KtLightMethod it.usage is KtLightMethod
} else usages.toList() } else usages.toList()
} }
\ No newline at end of file
...@@ -6,4 +6,4 @@ class B : A { ...@@ -6,4 +6,4 @@ class B : A {
override fun foo() {} override fun foo() {}
} }
class C(val b: B) : A by b class C(val b: B) : A by b
\ No newline at end of file
...@@ -24,4 +24,4 @@ class Test { ...@@ -24,4 +24,4 @@ class Test {
fun test() { fun test() {
var x: Boolean by LocalFreezableVar(true) var x: Boolean by LocalFreezableVar(true)
var y by LocalFreezableVar("") var y by LocalFreezableVar("")
} }
\ No newline at end of file
...@@ -13,4 +13,4 @@ class Test { ...@@ -13,4 +13,4 @@ class Test {
val y = getAny() as? String ?: "" val y = getAny() as? String ?: ""
y y
} }
} }
\ No newline at end of file
...@@ -5,4 +5,4 @@ inline fun <L> runLogged(action: () -> L): L { ...@@ -5,4 +5,4 @@ inline fun <L> runLogged(action: () -> L): L {
operator fun <V> V.getValue(receiver: Any?, p: Any): V = operator fun <V> V.getValue(receiver: Any?, p: Any): V =
runLogged { this } runLogged { this }
val testK by runLogged { "K" } val testK by runLogged { "K" }
\ No newline at end of file
...@@ -5,4 +5,4 @@ inline fun <L> runLogged(action: () -> L): L { ...@@ -5,4 +5,4 @@ inline fun <L> runLogged(action: () -> L): L {
operator fun String.getValue(receiver: Any?, p: Any): String = operator fun String.getValue(receiver: Any?, p: Any): String =
runLogged { this } runLogged { this }
val testK by runLogged { "K" } val testK by runLogged { "K" }
\ No newline at end of file
...@@ -16,4 +16,4 @@ fun <T> delegate(value: T): DelegateProvider<T> = DelegateProvider(value) ...@@ -16,4 +16,4 @@ fun <T> delegate(value: T): DelegateProvider<T> = DelegateProvider(value)
class A { class A {
val x by delegate(1) val x by delegate(1)
} }
\ No newline at end of file
...@@ -10,18 +10,18 @@ open class A3(x: String, y: String = "") { ...@@ -10,18 +10,18 @@ open class A3(x: String, y: String = "") {
constructor(x: String, b: Boolean = true) : this(x, x) constructor(x: String, b: Boolean = true) : this(x, x)
} }
class B3_1 : <!AMBIGUITY!>A3<!>("") class B3_1 : <!AMBIGUITY{LT}!><!AMBIGUITY{PSI}!>A3<!>("")<!>
class B3_2 : A3("", "asas") class B3_2 : A3("", "asas")
class B3_3 : A3("", true) class B3_3 : A3("", true)
class B3_4 : <!NONE_APPLICABLE!>A3<!>("", Unit) class B3_4 : <!NONE_APPLICABLE{LT}!><!NONE_APPLICABLE{PSI}!>A3<!>("", Unit)<!>
open class A4(val x: Byte) open class A4(val x: Byte)
class B4 : <!INAPPLICABLE_CANDIDATE!>A4<!>( 1 + 1) class B4 : <!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>A4<!>( 1 + 1)<!>
open class A5 { open class A5 {
constructor(x: Byte) constructor(x: Byte)
constructor(x: Short) constructor(x: Short)
} }
class B5_1 : <!NONE_APPLICABLE!>A5<!>(1 + 1) class B5_1 : <!NONE_APPLICABLE{LT}!><!NONE_APPLICABLE{PSI}!>A5<!>(1 + 1)<!>
class B5_2 : <!NONE_APPLICABLE!>A5<!>(100 * 2) class B5_2 : <!NONE_APPLICABLE{LT}!><!NONE_APPLICABLE{PSI}!>A5<!>(100 * 2)<!>
...@@ -2,4 +2,4 @@ open class Inv<T, R>(x: T, r: R) ...@@ -2,4 +2,4 @@ open class Inv<T, R>(x: T, r: R)
typealias Alias<X> = Inv<X, Inv<X, X>> typealias Alias<X> = Inv<X, Inv<X, X>>
class InvImpl : Alias<String>("", Inv("", "")) class InvImpl : Alias<String>("", Inv("", ""))
\ No newline at end of file
...@@ -2,4 +2,4 @@ open class Base<T1>(val x: T1) ...@@ -2,4 +2,4 @@ open class Base<T1>(val x: T1)
class Derived<T2 : Any>(x: T2) : Base<T2>(x) class Derived<T2 : Any>(x: T2) : Base<T2>(x)
fun <T3 : Any> create(x: T3) /* Derived<T3> */ = Derived(x) fun <T3 : Any> create(x: T3) /* Derived<T3> */ = Derived(x)
\ No newline at end of file
...@@ -22,7 +22,7 @@ class B : A() { ...@@ -22,7 +22,7 @@ class B : A() {
} }
fun g() { fun g() {
super.<!ABSTRACT_SUPER_CALL!>f<!>() super.<!ABSTRACT_SUPER_CALL{LT}!><!ABSTRACT_SUPER_CALL{PSI}!>f<!>()<!>
super.t() super.t()
super.x super.x
...@@ -32,7 +32,7 @@ class B : A() { ...@@ -32,7 +32,7 @@ class B : A() {
abstract class J : A() { abstract class J : A() {
fun r() { fun r() {
super.<!ABSTRACT_SUPER_CALL!>f<!>() super.<!ABSTRACT_SUPER_CALL{LT}!><!ABSTRACT_SUPER_CALL{PSI}!>f<!>()<!>
super.t() super.t()
super.x super.x
......
...@@ -13,5 +13,5 @@ open class B { ...@@ -13,5 +13,5 @@ open class B {
class A : IWithToString, B() { class A : IWithToString, B() {
override fun toString(): String = super.toString() // resolve to Any.toString override fun toString(): String = super.toString() // resolve to Any.toString
override fun foo(): String = super.foo() // resolve to B.foo() override fun foo(): String = super.foo() // resolve to B.foo()
override fun bar(): String = super.<!ABSTRACT_SUPER_CALL!>bar<!>() // should be an error override fun bar(): String = super.<!ABSTRACT_SUPER_CALL{LT}!><!ABSTRACT_SUPER_CALL{PSI}!>bar<!>()<!> // should be an error
} }
...@@ -28,4 +28,4 @@ class Class { ...@@ -28,4 +28,4 @@ class Class {
)<!> )<!>
) )
@Ann3(<!ANNOTATION_ARGUMENT_MUST_BE_CONST!>arr<!>) @Ann3(<!ANNOTATION_ARGUMENT_MUST_BE_CONST!>arr<!>)
fun test() {} fun test() {}
\ No newline at end of file
...@@ -8,4 +8,4 @@ val foo = TestEnum.Foo ...@@ -8,4 +8,4 @@ val foo = TestEnum.Foo
var bar = TestEnum.Foo var bar = TestEnum.Foo
@Ann(<!ANNOTATION_ARGUMENT_MUST_BE_ENUM_CONST!>foo<!>, <!ANNOTATION_ARGUMENT_MUST_BE_ENUM_CONST!>bar<!>) @Ann(<!ANNOTATION_ARGUMENT_MUST_BE_ENUM_CONST!>foo<!>, <!ANNOTATION_ARGUMENT_MUST_BE_ENUM_CONST!>bar<!>)
fun test() {} fun test() {}
\ No newline at end of file
...@@ -21,4 +21,4 @@ fun bar() = Foo::class ...@@ -21,4 +21,4 @@ fun bar() = Foo::class
<!ANNOTATION_ARGUMENT_MUST_BE_KCLASS_LITERAL!>bar()<!> <!ANNOTATION_ARGUMENT_MUST_BE_KCLASS_LITERAL!>bar()<!>
] ]
) )
fun test1() {} fun test1() {}
\ No newline at end of file
annotation class A() { annotation class A() {
<!ANNOTATION_CLASS_MEMBER!><!PRIMARY_CONSTRUCTOR_DELEGATION_CALL_EXPECTED!>constructor(s: Nothing?)<!> {}<!> <!ANNOTATION_CLASS_MEMBER!><!PRIMARY_CONSTRUCTOR_DELEGATION_CALL_EXPECTED{PSI}!>constructor(s: Nothing?)<!><!PRIMARY_CONSTRUCTOR_DELEGATION_CALL_EXPECTED{LT}!><!> {}<!>
<!ANNOTATION_CLASS_MEMBER!>init {}<!> <!ANNOTATION_CLASS_MEMBER!>init {}<!>
<!ANNOTATION_CLASS_MEMBER!>fun foo() {}<!> <!ANNOTATION_CLASS_MEMBER!>fun foo() {}<!>
<!ANNOTATION_CLASS_MEMBER!>val bar: Nothing?<!> <!ANNOTATION_CLASS_MEMBER!>val bar: Nothing?<!>
<!ANNOTATION_CLASS_MEMBER!>val baz get() = Unit<!> <!ANNOTATION_CLASS_MEMBER!>val baz get() = Unit<!>
} }
\ No newline at end of file
...@@ -14,4 +14,4 @@ fun A.test_2() { ...@@ -14,4 +14,4 @@ fun A.test_2() {
object : B by b {} object : B by b {}
} }
class D(val x: String, val y: String = <!NO_THIS!>this<!>.<!UNRESOLVED_REFERENCE!>x<!>) {} class D(val x: String, val y: String = <!NO_THIS!>this<!>.<!UNRESOLVED_REFERENCE!>x<!>) {}
\ No newline at end of file
...@@ -2,4 +2,4 @@ class A ...@@ -2,4 +2,4 @@ class A
interface C interface C
enum class B : C, <!CLASS_IN_SUPERTYPE_FOR_ENUM!>A<!>(), Any() enum class B : C, <!CLASS_IN_SUPERTYPE_FOR_ENUM!>A<!>(), Any()
\ No newline at end of file
...@@ -49,7 +49,7 @@ fun lol(a: Array<Boolean>) {} ...@@ -49,7 +49,7 @@ fun lol(a: Array<Boolean>) {}
<!CONFLICTING_OVERLOADS!>fun <T> mem(t: T) where T : String, T : () -> Boolean {}<!> <!CONFLICTING_OVERLOADS!>fun <T> mem(t: T) where T : String, T : () -> Boolean {}<!>
class M { class M {
companion <!REDECLARATION!>object<!> {} <!REDECLARATION{LT}!>companion <!REDECLARATION{PSI}!>object<!> {}<!>
<!REDECLARATION!>val Companion = object : Any {}<!> <!REDECLARATION!>val Companion = object : Any {}<!>
} }
...@@ -65,4 +65,4 @@ class mest ...@@ -65,4 +65,4 @@ class mest
fun() {} fun() {}
private fun() {} private fun() {}
\ No newline at end of file
interface <!CONSTRUCTOR_IN_INTERFACE!>A(val s: String)<!> <!CONSTRUCTOR_IN_INTERFACE{LT}!>interface <!CONSTRUCTOR_IN_INTERFACE{PSI}!>A(val s: String)<!><!>
interface <!CONSTRUCTOR_IN_INTERFACE!>B constructor(val s: String)<!> <!CONSTRUCTOR_IN_INTERFACE{LT}!>interface <!CONSTRUCTOR_IN_INTERFACE{PSI}!>B constructor(val s: String)<!><!>
interface C { interface C {
<!CONSTRUCTOR_IN_INTERFACE!>constructor(val s: String)<!> {} <!CONSTRUCTOR_IN_INTERFACE{LT}!><!CONSTRUCTOR_IN_INTERFACE{PSI}!>constructor(val s: String)<!> {}<!>
} }
\ No newline at end of file
...@@ -2,14 +2,14 @@ class B ...@@ -2,14 +2,14 @@ class B
class C class C
class A() { class A() {
constructor(a: Int) : <!CYCLIC_CONSTRUCTOR_DELEGATION_CALL!>this<!>("test") {} constructor(a: Int) : <!CYCLIC_CONSTRUCTOR_DELEGATION_CALL{LT}!><!CYCLIC_CONSTRUCTOR_DELEGATION_CALL{PSI}!>this<!>("test")<!> {}
constructor(a: String) : <!CYCLIC_CONSTRUCTOR_DELEGATION_CALL!>this<!>(10) {} constructor(a: String) : <!CYCLIC_CONSTRUCTOR_DELEGATION_CALL{LT}!><!CYCLIC_CONSTRUCTOR_DELEGATION_CALL{PSI}!>this<!>(10)<!> {}
constructor(a: Boolean) : <!CYCLIC_CONSTRUCTOR_DELEGATION_CALL!>this<!>('\n') {} constructor(a: Boolean) : <!CYCLIC_CONSTRUCTOR_DELEGATION_CALL{LT}!><!CYCLIC_CONSTRUCTOR_DELEGATION_CALL{PSI}!>this<!>('\n')<!> {}
constructor(a: Char) : <!CYCLIC_CONSTRUCTOR_DELEGATION_CALL!>this<!>(0.0) {} constructor(a: Char) : <!CYCLIC_CONSTRUCTOR_DELEGATION_CALL{LT}!><!CYCLIC_CONSTRUCTOR_DELEGATION_CALL{PSI}!>this<!>(0.0)<!> {}
constructor(a: Double) : <!CYCLIC_CONSTRUCTOR_DELEGATION_CALL!>this<!>(false) {} constructor(a: Double) : <!CYCLIC_CONSTRUCTOR_DELEGATION_CALL{LT}!><!CYCLIC_CONSTRUCTOR_DELEGATION_CALL{PSI}!>this<!>(false)<!> {}
constructor(b: B) : <!CYCLIC_CONSTRUCTOR_DELEGATION_CALL!>this<!>(3.14159265) {} constructor(b: B) : <!CYCLIC_CONSTRUCTOR_DELEGATION_CALL{LT}!><!CYCLIC_CONSTRUCTOR_DELEGATION_CALL{PSI}!>this<!>(3.14159265)<!> {}
constructor(c: C) : this() {} constructor(c: C) : this() {}
constructor(a: List<Int>) : this(C()) {} constructor(a: List<Int>) : this(C()) {}
...@@ -17,7 +17,7 @@ class A() { ...@@ -17,7 +17,7 @@ class A() {
class D { class D {
constructor(i: Boolean) {} constructor(i: Boolean) {}
constructor(i: Int) : <!CYCLIC_CONSTRUCTOR_DELEGATION_CALL!>this<!>(3) {} constructor(i: Int) : <!CYCLIC_CONSTRUCTOR_DELEGATION_CALL{LT}!><!CYCLIC_CONSTRUCTOR_DELEGATION_CALL{PSI}!>this<!>(3)<!> {}
} }
class E<T> { class E<T> {
...@@ -25,7 +25,7 @@ class E<T> { ...@@ -25,7 +25,7 @@ class E<T> {
// selection of the proper constructor // selection of the proper constructor
// but a type mismatch for the first // but a type mismatch for the first
// argument // argument
constructor(e: T, i: Int) : <!INAPPLICABLE_CANDIDATE!>this<!>(i, 10) {} constructor(e: T, i: Int) : <!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>this<!>(i, 10)<!> {}
} }
class I<T> { class I<T> {
...@@ -33,7 +33,7 @@ class I<T> { ...@@ -33,7 +33,7 @@ class I<T> {
// selection of the proper constructor // selection of the proper constructor
// but a type mismatch for the first // but a type mismatch for the first
// argument // argument
constructor(e: T, i: Int) : <!INAPPLICABLE_CANDIDATE!>this<!>(i, 10) constructor(e: T, i: Int) : <!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>this<!>(i, 10)<!>
} }
class J<T> { class J<T> {
...@@ -42,20 +42,20 @@ class J<T> { ...@@ -42,20 +42,20 @@ class J<T> {
} }
class F(s: String) { class F(s: String) {
<!PRIMARY_CONSTRUCTOR_DELEGATION_CALL_EXPECTED!>constructor(i: Boolean)<!> {} <!PRIMARY_CONSTRUCTOR_DELEGATION_CALL_EXPECTED{PSI}!>constructor(i: Boolean)<!><!PRIMARY_CONSTRUCTOR_DELEGATION_CALL_EXPECTED{LT}!><!> {}
constructor(i: Int) : <!CYCLIC_CONSTRUCTOR_DELEGATION_CALL!>this<!>(3) {} constructor(i: Int) : <!CYCLIC_CONSTRUCTOR_DELEGATION_CALL{LT}!><!CYCLIC_CONSTRUCTOR_DELEGATION_CALL{PSI}!>this<!>(3)<!> {}
} }
class G(x: Int) { class G(x: Int) {
<!PRIMARY_CONSTRUCTOR_DELEGATION_CALL_EXPECTED!>constructor()<!> {} <!PRIMARY_CONSTRUCTOR_DELEGATION_CALL_EXPECTED{PSI}!>constructor()<!><!PRIMARY_CONSTRUCTOR_DELEGATION_CALL_EXPECTED{LT}!><!> {}
} }
class H(x: Int) { class H(x: Int) {
<!PRIMARY_CONSTRUCTOR_DELEGATION_CALL_EXPECTED!>constructor()<!> <!PRIMARY_CONSTRUCTOR_DELEGATION_CALL_EXPECTED{PSI}!>constructor()<!><!PRIMARY_CONSTRUCTOR_DELEGATION_CALL_EXPECTED{LT}!><!>
} }
class K(x: Int) { class K(x: Int) {
constructor() : <!CYCLIC_CONSTRUCTOR_DELEGATION_CALL!>this<!>() {} constructor() : <!CYCLIC_CONSTRUCTOR_DELEGATION_CALL{LT}!><!CYCLIC_CONSTRUCTOR_DELEGATION_CALL{PSI}!>this<!>()<!> {}
} }
class M { class M {
...@@ -63,5 +63,5 @@ class M { ...@@ -63,5 +63,5 @@ class M {
} }
class U : M { class U : M {
<!INAPPLICABLE_CANDIDATE!>constructor()<!> <!INAPPLICABLE_CANDIDATE{PSI}!>constructor()<!><!INAPPLICABLE_CANDIDATE{LT}!><!>
} }
...@@ -6,4 +6,4 @@ interface B : <!DELEGATION_IN_INTERFACE, INTERFACE_WITH_SUPERCLASS!>A<!> by a { ...@@ -6,4 +6,4 @@ interface B : <!DELEGATION_IN_INTERFACE, INTERFACE_WITH_SUPERCLASS!>A<!> by a {
val test = A() val test = A()
interface C : <!DELEGATION_IN_INTERFACE, INTERFACE_WITH_SUPERCLASS!>A<!> by test interface C : <!DELEGATION_IN_INTERFACE, INTERFACE_WITH_SUPERCLASS!>A<!> by test
\ No newline at end of file
enum class A { enum class A {
A(1), B(2), C("test"); A(1), B(2), C("test");
constructor(x: Int) : <!DELEGATION_SUPER_CALL_IN_ENUM_CONSTRUCTOR!>super<!>() constructor(x: Int) : <!DELEGATION_SUPER_CALL_IN_ENUM_CONSTRUCTOR{LT}!><!DELEGATION_SUPER_CALL_IN_ENUM_CONSTRUCTOR{PSI}!>super<!>()<!>
constructor(t: String) : this(10) constructor(t: String) : this(10)
} }
\ No newline at end of file
...@@ -3,16 +3,16 @@ class A(x: Int) { ...@@ -3,16 +3,16 @@ class A(x: Int) {
} }
class B : A { class B : A {
<!EXPLICIT_DELEGATION_CALL_REQUIRED, NONE_APPLICABLE!>constructor()<!> <!EXPLICIT_DELEGATION_CALL_REQUIRED, NONE_APPLICABLE{PSI}!>constructor()<!><!NONE_APPLICABLE{LT}!><!>
constructor(z: String) : this() constructor(z: String) : this()
} }
<!SUPERTYPE_INITIALIZED_WITHOUT_PRIMARY_CONSTRUCTOR!>class C : A(20) { <!SUPERTYPE_INITIALIZED_WITHOUT_PRIMARY_CONSTRUCTOR!>class C : A(20) {
<!EXPLICIT_DELEGATION_CALL_REQUIRED, NONE_APPLICABLE!>constructor()<!> <!EXPLICIT_DELEGATION_CALL_REQUIRED, NONE_APPLICABLE{PSI}!>constructor()<!><!NONE_APPLICABLE{LT}!><!>
constructor(z: String) : this() constructor(z: String) : this()
}<!> }<!>
class D() : A(20) { class D() : A(20) {
<!NONE_APPLICABLE, PRIMARY_CONSTRUCTOR_DELEGATION_CALL_EXPECTED!>constructor(x: Int)<!> <!NONE_APPLICABLE{PSI}, PRIMARY_CONSTRUCTOR_DELEGATION_CALL_EXPECTED{PSI}!>constructor(x: Int)<!><!NONE_APPLICABLE{LT}, PRIMARY_CONSTRUCTOR_DELEGATION_CALL_EXPECTED{LT}!><!>
constructor(z: String) : this() constructor(z: String) : this()
} }
\ No newline at end of file
...@@ -35,4 +35,4 @@ fun rest() { ...@@ -35,4 +35,4 @@ fun rest() {
<!INAPPLICABLE_LATEINIT_MODIFIER!>lateinit var i: Int<!> <!INAPPLICABLE_LATEINIT_MODIFIER!>lateinit var i: Int<!>
lateinit var a: A lateinit var a: A
<!INAPPLICABLE_LATEINIT_MODIFIER!>lateinit var b: B<String> = B()<!> <!INAPPLICABLE_LATEINIT_MODIFIER!>lateinit var b: B<String> = B()<!>
} }
\ No newline at end of file
...@@ -28,4 +28,4 @@ private abstract class M : K() ...@@ -28,4 +28,4 @@ private abstract class M : K()
class X { class X {
<!INCOMPATIBLE_MODIFIERS!>inner<!> <!INCOMPATIBLE_MODIFIERS!>data<!> class Y(val i: Int) <!INCOMPATIBLE_MODIFIERS!>inner<!> <!INCOMPATIBLE_MODIFIERS!>data<!> class Y(val i: Int)
<!INCOMPATIBLE_MODIFIERS!>sealed<!> <!INCOMPATIBLE_MODIFIERS!>inner<!> class Z <!INCOMPATIBLE_MODIFIERS!>sealed<!> <!INCOMPATIBLE_MODIFIERS!>inner<!> class Z
} }
\ No newline at end of file
class A { class A {
constructor(x: Int = <!UNRESOLVED_REFERENCE!>getSomeInt<!>(), other: A = <!INSTANCE_ACCESS_BEFORE_SUPER_CALL!>this<!>, header: String = <!UNRESOLVED_REFERENCE!>keker<!>) {} constructor(x: Int = <!UNRESOLVED_REFERENCE{LT}!><!UNRESOLVED_REFERENCE{PSI}!>getSomeInt<!>()<!>, other: A = <!INSTANCE_ACCESS_BEFORE_SUPER_CALL!>this<!>, header: String = <!UNRESOLVED_REFERENCE!>keker<!>) {}
fun getSomeInt() = 10 fun getSomeInt() = 10
var keker = "test" var keker = "test"
} }
...@@ -7,10 +7,10 @@ class A { ...@@ -7,10 +7,10 @@ class A {
class B(other: B = <!NO_THIS!>this<!>) class B(other: B = <!NO_THIS!>this<!>)
class C() { class C() {
constructor(x: Int) : <!INAPPLICABLE_CANDIDATE!>this<!>({ constructor(x: Int) : <!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>this<!>({
val a = 10 val a = 10
<!INSTANCE_ACCESS_BEFORE_SUPER_CALL!>this<!> <!INSTANCE_ACCESS_BEFORE_SUPER_CALL!>this<!>
}) {} })<!> {}
} }
class D { class D {
......
...@@ -5,4 +5,4 @@ interface B : <!INTERFACE_WITH_SUPERCLASS, SUPERTYPE_INITIALIZED_IN_INTERFACE!>A ...@@ -5,4 +5,4 @@ interface B : <!INTERFACE_WITH_SUPERCLASS, SUPERTYPE_INITIALIZED_IN_INTERFACE!>A
interface C interface C
class D class D
interface E : <!INTERFACE_WITH_SUPERCLASS, SUPERTYPE_INITIALIZED_IN_INTERFACE!>A<!>(), C, <!SUPERTYPE_INITIALIZED_IN_INTERFACE!>D<!>() interface E : <!INTERFACE_WITH_SUPERCLASS, SUPERTYPE_INITIALIZED_IN_INTERFACE!>A<!>(), C, <!SUPERTYPE_INITIALIZED_IN_INTERFACE!>D<!>()
\ No newline at end of file
...@@ -2,7 +2,7 @@ fun foo() { ...@@ -2,7 +2,7 @@ fun foo() {
<!LOCAL_ANNOTATION_CLASS_ERROR!>annotation class Ann<!> <!LOCAL_ANNOTATION_CLASS_ERROR!>annotation class Ann<!>
@Ann class Local { @Ann class Local {
// There should also be NESTED_CLASS_NOT_ALLOWED report here. <!LOCAL_ANNOTATION_CLASS_ERROR{LT}!>// There should also be NESTED_CLASS_NOT_ALLOWED report here.
<!LOCAL_ANNOTATION_CLASS_ERROR!>annotation class Nested<!> <!LOCAL_ANNOTATION_CLASS_ERROR{PSI}!>annotation class Nested<!><!>
} }
} }
...@@ -6,19 +6,19 @@ object A { ...@@ -6,19 +6,19 @@ object A {
interface X interface X
val a = object : Any() { val a = object : Any() {
<!LOCAL_OBJECT_NOT_ALLOWED!>object D<!> { <!LOCAL_OBJECT_NOT_ALLOWED{LT}!><!LOCAL_OBJECT_NOT_ALLOWED{PSI}!>object D<!> {
<!LOCAL_OBJECT_NOT_ALLOWED!>object G<!> <!LOCAL_OBJECT_NOT_ALLOWED!>object G<!>
<!LOCAL_INTERFACE_NOT_ALLOWED!>interface Z<!> <!LOCAL_INTERFACE_NOT_ALLOWED!>interface Z<!>
} }<!>
<!LOCAL_INTERFACE_NOT_ALLOWED!>interface Y<!> <!LOCAL_INTERFACE_NOT_ALLOWED!>interface Y<!>
} }
fun b() { fun b() {
<!LOCAL_OBJECT_NOT_ALLOWED!>object E<!> { <!LOCAL_OBJECT_NOT_ALLOWED{LT}!><!LOCAL_OBJECT_NOT_ALLOWED{PSI}!>object E<!> {
<!LOCAL_OBJECT_NOT_ALLOWED!>object F<!> <!LOCAL_OBJECT_NOT_ALLOWED!>object F<!>
<!LOCAL_INTERFACE_NOT_ALLOWED!>interface M<!> <!LOCAL_INTERFACE_NOT_ALLOWED!>interface M<!>
} }<!>
<!LOCAL_INTERFACE_NOT_ALLOWED!>interface N<!> <!LOCAL_INTERFACE_NOT_ALLOWED!>interface N<!>
...@@ -28,4 +28,4 @@ object A { ...@@ -28,4 +28,4 @@ object A {
<!LOCAL_INTERFACE_NOT_ALLOWED!>interface U<!> <!LOCAL_INTERFACE_NOT_ALLOWED!>interface U<!>
} }
} }
} }
\ No newline at end of file
class A { class A {
companion <!REDECLARATION!>object<!> { <!REDECLARATION{LT}!>companion <!REDECLARATION{PSI}!>object<!> {
} }<!>
companion <!MANY_COMPANION_OBJECTS, REDECLARATION!>object<!> { <!MANY_COMPANION_OBJECTS{LT}, REDECLARATION{LT}!>companion <!MANY_COMPANION_OBJECTS{PSI}, REDECLARATION{PSI}!>object<!> {
} }<!>
} }
class B { class B {
...@@ -13,7 +13,7 @@ class B { ...@@ -13,7 +13,7 @@ class B {
} }
companion <!MANY_COMPANION_OBJECTS!>object B<!> { <!MANY_COMPANION_OBJECTS{LT}!>companion <!MANY_COMPANION_OBJECTS{PSI}!>object B<!> {
} }<!>
} }
\ No newline at end of file
...@@ -22,4 +22,4 @@ interface D { ...@@ -22,4 +22,4 @@ interface D {
override operator fun toString(): String override operator fun toString(): String
override operator fun equals(other: Any?): Boolean override operator fun equals(other: Any?): Boolean
override operator fun hashCode(): Int override operator fun hashCode(): Int
} }
\ No newline at end of file
...@@ -10,4 +10,4 @@ const val cnst = 2 ...@@ -10,4 +10,4 @@ const val cnst = 2
<!NON_CONST_VAL_USED_IN_CONSTANT_EXPRESSION!>foo + cnst.toString()<!> <!NON_CONST_VAL_USED_IN_CONSTANT_EXPRESSION!>foo + cnst.toString()<!>
)<!> )<!>
) )
fun test() {} fun test() {}
\ No newline at end of file
...@@ -4,7 +4,7 @@ class A { ...@@ -4,7 +4,7 @@ class A {
class B : A { class B : A {
fun g() { fun g() {
<!NOT_A_SUPERTYPE!>super<String><!>.<!UNRESOLVED_REFERENCE!>f<!>() <!NOT_A_SUPERTYPE!>super<String><!>.<!UNRESOLVED_REFERENCE{LT}!><!UNRESOLVED_REFERENCE{PSI}!>f<!>()<!>
super<A>.f() super<A>.f()
} }
} }
\ No newline at end of file
...@@ -6,4 +6,4 @@ data class A {} ...@@ -6,4 +6,4 @@ data class A {}
<!PRIMARY_CONSTRUCTOR_REQUIRED_FOR_DATA_CLASS!>data class C { <!PRIMARY_CONSTRUCTOR_REQUIRED_FOR_DATA_CLASS!>data class C {
constructor(x: Int) constructor(x: Int)
}<!> }<!>
\ No newline at end of file
...@@ -26,7 +26,7 @@ class G<E : Double>(val balue: E) : F<E>(balue) { ...@@ -26,7 +26,7 @@ class G<E : Double>(val balue: E) : F<E>(balue) {
override var rest: E = balue override var rest: E = balue
} }
class H<E : String>(val balue: E) : <!INAPPLICABLE_CANDIDATE!>F<E><!>(balue) { class H<E : String>(val balue: E) : <!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>F<E><!>(balue)<!> {
override var rest: E = balue // no report because of INAPPLICABLE_CANDIDATE override var rest: E = balue // no report because of INAPPLICABLE_CANDIDATE
} }
......
...@@ -31,4 +31,4 @@ class Test2 : IDerived<String>, AliasedIBase { ...@@ -31,4 +31,4 @@ class Test2 : IDerived<String>, AliasedIBase {
super<IDerived>.bar() super<IDerived>.bar()
super<IDerived>.qux() super<IDerived>.qux()
} }
} }
\ No newline at end of file
<!REDUNDANT_MODIFIER!>open<!> abstract class A <!REDUNDANT_MODIFIER!>open<!> abstract class A
<!REDUNDANT_MODIFIER!>abstract<!> sealed class B <!REDUNDANT_MODIFIER!>abstract<!> sealed class B
\ No newline at end of file
...@@ -14,4 +14,4 @@ enum <!REPEATED_MODIFIER!>enum<!> class C { ...@@ -14,4 +14,4 @@ enum <!REPEATED_MODIFIER!>enum<!> class C {
open class E(private <!REPEATED_MODIFIER!>private<!> val int: Int = 5) { open class E(private <!REPEATED_MODIFIER!>private<!> val int: Int = 5) {
protected <!REPEATED_MODIFIER!>protected<!> var double = int + 8.0 protected <!REPEATED_MODIFIER!>protected<!> var double = int + 8.0
} }
\ No newline at end of file
...@@ -27,7 +27,7 @@ class G<E : Double>(val balue: E) : F<E>(balue) { ...@@ -27,7 +27,7 @@ class G<E : Double>(val balue: E) : F<E>(balue) {
override fun rest(): E = balue override fun rest(): E = balue
} }
class H<E : String>(val balue: E) : <!INAPPLICABLE_CANDIDATE!>F<E><!>(balue) { class H<E : String>(val balue: E) : <!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>F<E><!>(balue)<!> {
override fun rest(): E = balue // no report because of INAPPLICABLE_CANDIDATE override fun rest(): E = balue // no report because of INAPPLICABLE_CANDIDATE
} }
...@@ -66,4 +66,4 @@ open class GoodDerrived : Base<Y, W>() { ...@@ -66,4 +66,4 @@ open class GoodDerrived : Base<Y, W>() {
open class BadDerrived : Base<Y, W>() { open class BadDerrived : Base<Y, W>() {
override fun kek(): <!RETURN_TYPE_MISMATCH_ON_OVERRIDE!>String<!> = "test" override fun kek(): <!RETURN_TYPE_MISMATCH_ON_OVERRIDE!>String<!> = "test"
} }
\ No newline at end of file
sealed class A sealed class A
val b = <!SEALED_CLASS_CONSTRUCTOR_CALL!>A<!>() val b = <!SEALED_CLASS_CONSTRUCTOR_CALL{LT}!><!SEALED_CLASS_CONSTRUCTOR_CALL{PSI}!>A<!>()<!>
\ No newline at end of file
...@@ -28,13 +28,13 @@ sealed class P { ...@@ -28,13 +28,13 @@ sealed class P {
class K : P() class K : P()
<!REDECLARATION!>object B<!> { <!REDECLARATION{LT}!><!REDECLARATION{PSI}!>object B<!> {
class I : <!SEALED_SUPERTYPE!>P<!>() class I : <!SEALED_SUPERTYPE!>P<!>()
} }<!>
fun test() { fun test() {
class L : <!SEALED_SUPERTYPE_IN_LOCAL_CLASS!>P<!>() class L : <!SEALED_SUPERTYPE_IN_LOCAL_CLASS!>P<!>()
val a = object : <!SEALED_SUPERTYPE_IN_LOCAL_CLASS!>P<!>() { val a = object : <!SEALED_SUPERTYPE_IN_LOCAL_CLASS!>P<!>() {
} }
} }
\ No newline at end of file
...@@ -9,4 +9,4 @@ class C(a: A) : B(a) { ...@@ -9,4 +9,4 @@ class C(a: A) : B(a) {
// Should be resolved to delegated B.foo (no error) // Should be resolved to delegated B.foo (no error)
super.foo() super.foo()
} }
} }
\ No newline at end of file
...@@ -4,7 +4,7 @@ class B: A() { ...@@ -4,7 +4,7 @@ class B: A() {
fun act() { fun act() {
<!SUPER_IS_NOT_AN_EXPRESSION!>super<!>() <!SUPER_IS_NOT_AN_EXPRESSION!>super<!>()
<!UNRESOLVED_REFERENCE!>invoke<!>() <!UNRESOLVED_REFERENCE{LT}!><!UNRESOLVED_REFERENCE{PSI}!>invoke<!>()<!>
<!SUPER_IS_NOT_AN_EXPRESSION!>super<!> { <!SUPER_IS_NOT_AN_EXPRESSION!>super<!> {
println(<!ILLEGAL_CONST_EXPRESSION!>'weird'<!>) println(<!ILLEGAL_CONST_EXPRESSION!>'weird'<!>)
......
fun String.f() { fun String.f() {
<!SUPER_NOT_AVAILABLE!>super@f<!>.<!UNRESOLVED_REFERENCE!>compareTo<!>("") <!SUPER_NOT_AVAILABLE!>super@f<!>.<!UNRESOLVED_REFERENCE{LT}!><!UNRESOLVED_REFERENCE{PSI}!>compareTo<!>("")<!>
<!SUPER_NOT_AVAILABLE!>super<!>.<!UNRESOLVED_REFERENCE!>compareTo<!>("") <!SUPER_NOT_AVAILABLE!>super<!>.<!UNRESOLVED_REFERENCE{LT}!><!UNRESOLVED_REFERENCE{PSI}!>compareTo<!>("")<!>
} }
fun foo() { fun foo() {
<!SUPER_NOT_AVAILABLE!>super<!> <!SUPER_NOT_AVAILABLE!>super<!>
<!SUPER_NOT_AVAILABLE!>super<!>.<!UNRESOLVED_REFERENCE!>foo<!>() <!SUPER_NOT_AVAILABLE!>super<!>.<!UNRESOLVED_REFERENCE{LT}!><!UNRESOLVED_REFERENCE{PSI}!>foo<!>()<!>
<!SUPER_NOT_AVAILABLE!>super<Nothing><!>.<!UNRESOLVED_REFERENCE!>foo<!>() <!SUPER_NOT_AVAILABLE!>super<Nothing><!>.<!UNRESOLVED_REFERENCE{LT}!><!UNRESOLVED_REFERENCE{PSI}!>foo<!>()<!>
} }
class A { class A {
fun act() { fun act() {
<!UNRESOLVED_REFERENCE!>println<!>("Test") <!UNRESOLVED_REFERENCE{LT}!><!UNRESOLVED_REFERENCE{PSI}!>println<!>("Test")<!>
} }
fun String.fact() { fun String.fact() {
<!UNRESOLVED_REFERENCE!>println<!>("Fest") <!UNRESOLVED_REFERENCE{LT}!><!UNRESOLVED_REFERENCE{PSI}!>println<!>("Fest")<!>
} }
} }
\ No newline at end of file
...@@ -6,4 +6,4 @@ interface ATrait : <!INTERFACE_WITH_SUPERCLASS!>A<!> { ...@@ -6,4 +6,4 @@ interface ATrait : <!INTERFACE_WITH_SUPERCLASS!>A<!> {
override fun foo() { override fun foo() {
<!SUPERCLASS_NOT_ACCESSIBLE_FROM_INTERFACE!>super<A><!>.foo() <!SUPERCLASS_NOT_ACCESSIBLE_FROM_INTERFACE!>super<A><!>.foo()
} }
} }
\ No newline at end of file
...@@ -10,4 +10,4 @@ interface E : <!INTERFACE_WITH_SUPERCLASS, SUPERTYPE_INITIALIZED_IN_INTERFACE!>A ...@@ -10,4 +10,4 @@ interface E : <!INTERFACE_WITH_SUPERCLASS, SUPERTYPE_INITIALIZED_IN_INTERFACE!>A
interface F : A, <!SUPERTYPE_INITIALIZED_IN_INTERFACE!>B<!>(), <!INTERFACE_WITH_SUPERCLASS!>C<!>, <!SUPERTYPE_INITIALIZED_IN_INTERFACE!>D<!>(), <!SUPERTYPE_INITIALIZED_IN_INTERFACE!>Any<!>() { interface F : A, <!SUPERTYPE_INITIALIZED_IN_INTERFACE!>B<!>(), <!INTERFACE_WITH_SUPERCLASS!>C<!>, <!SUPERTYPE_INITIALIZED_IN_INTERFACE!>D<!>(), <!SUPERTYPE_INITIALIZED_IN_INTERFACE!>Any<!>() {
} }
\ No newline at end of file
...@@ -8,4 +8,4 @@ class F() : C(10) ...@@ -8,4 +8,4 @@ class F() : C(10)
<!SUPERTYPE_INITIALIZED_WITHOUT_PRIMARY_CONSTRUCTOR!>class G : C(10) { <!SUPERTYPE_INITIALIZED_WITHOUT_PRIMARY_CONSTRUCTOR!>class G : C(10) {
constructor() : super(1) constructor() : super(1)
}<!> }<!>
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册