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

[TD] Update test data after previous commit

上级 49d9b859
open class A
class B : A()
\ No newline at end of file
class B : A()
......@@ -6,4 +6,4 @@ typealias TA = A
class B : TA() {
class NestedInB : Nested()
}
\ No newline at end of file
}
......@@ -10,4 +10,4 @@ abstract class My {
class Your : My() {
class NestedThree : NestedOne()
}
\ No newline at end of file
}
......@@ -3,4 +3,4 @@ package p
open class A
class B : A()
\ No newline at end of file
class B : A()
......@@ -15,5 +15,5 @@ class B : A() {
}
fun test(b: B) {
b.<!HIDDEN!>foo<!>("")
b.<!HIDDEN{LT}!><!HIDDEN{PSI}!>foo<!>("")<!>
}
......@@ -8,19 +8,19 @@ fun test() {
foo(1, 2.0, true)
foo(1, third = true)
<!INAPPLICABLE_CANDIDATE!>foo<!>()
<!INAPPLICABLE_CANDIDATE!>foo<!>(0, 0.0, false, "")
<!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>foo<!>()<!>
<!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>foo<!>(0, 0.0, false, "")<!>
bar(1, third = true)
bar(1, 2.0, true)
bar(1, 2.0, true, "my")
<!INAPPLICABLE_CANDIDATE!>bar<!>(1, true)
<!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>bar<!>(1, true)<!>
baz(1)
baz(1, "my", "yours")
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) {
a.foo()
a.foo(1)
a.<!INAPPLICABLE_CANDIDATE!>bar<!>()
a.<!INAPPLICABLE_CANDIDATE!>bar<!>("")
a.<!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>bar<!>()<!>
a.<!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>bar<!>("")<!>
a.bar(y = 1)
a.bar("", 2)
}
......@@ -2,4 +2,4 @@ fun test(
val f: String.() -> Int = { length }
): Int {
return "".f()
}
\ No newline at end of file
}
......@@ -4,4 +4,4 @@ fun test() {
foo {
this + it
}
}
\ No newline at end of file
}
......@@ -17,9 +17,9 @@ fun test_1() {
}
fun test_2() {
<!INAPPLICABLE_CANDIDATE!>takeInt<!>(10000000000)
<!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>takeInt<!>(10000000000)<!>
takeLong(10000000000)
<!INAPPLICABLE_CANDIDATE!>takeByte<!>(1000)
<!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>takeByte<!>(1000)<!>
}
fun test_3() {
......@@ -35,8 +35,8 @@ fun test_4() {
}
fun test_5() {
<!INAPPLICABLE_CANDIDATE!>takeString<!>(1)
<!INAPPLICABLE_CANDIDATE!>takeString<!>(run { 1 })
<!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>takeString<!>(1)<!>
<!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>takeString<!>(run { 1 })<!>
}
annotation class Ann(val x: Byte)
......
......@@ -6,4 +6,4 @@ class My(var x: Int) {
fun copy() = My(x)
}
fun testInvoke(): Int = My(13)()
\ No newline at end of file
fun testInvoke(): Int = My(13)()
......@@ -13,6 +13,6 @@ fun takeOutA(array: Array<out A>) {}
fun test(array: Array<B>) {
A.take(array)
<!INAPPLICABLE_CANDIDATE!>takeA<!>(array)
<!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>takeA<!>(array)<!>
takeOutA(array)
}
\ No newline at end of file
}
......@@ -10,8 +10,8 @@ fun test() {
foo({})
// Bad
<!INAPPLICABLE_CANDIDATE!>foo<!>(1) {}
<!INAPPLICABLE_CANDIDATE!>foo<!>(f = {}) {}
<!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>foo<!>(1) {}<!>
<!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>foo<!>(f = {}) {}<!>
// OK
bar(1) {}
......@@ -20,15 +20,15 @@ fun test() {
bar(x = 1, f = {})
// Bad
<!INAPPLICABLE_CANDIDATE!>bar<!> {}
<!INAPPLICABLE_CANDIDATE!>bar<!>({})
<!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>bar<!> {}<!>
<!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>bar<!>({})<!>
// OK
baz(other = false, f = {})
baz({}, false)
// Bad
<!INAPPLICABLE_CANDIDATE!>baz<!> {}
<!INAPPLICABLE_CANDIDATE!>baz<!>() {}
<!INAPPLICABLE_CANDIDATE!>baz<!>(other = false) {}
}
\ No newline at end of file
<!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>baz<!> {}<!>
<!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>baz<!>() {}<!>
<!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>baz<!>(other = false) {}<!>
}
......@@ -20,4 +20,4 @@ fun test(ordinal: Int) {
}
}
}
}
\ No newline at end of file
}
......@@ -25,4 +25,4 @@ fun test() {
val processor = AdapterProcessor<PsiMethod, PsiClass>(
Function { method: PsiMethod? -> method?.containingClass }
)
}
\ No newline at end of file
}
fun <R> materialize(): R = null!!
fun test_1() {
<!UNRESOLVED_REFERENCE!>myRun<!> {
<!UNRESOLVED_REFERENCE{LT}!><!UNRESOLVED_REFERENCE{PSI}!>myRun<!> {
val x = 1
x * 2
}
}<!>
}
fun test_2() {
<!UNRESOLVED_REFERENCE!>myRun<!> {
<!UNRESOLVED_REFERENCE{LT}!><!UNRESOLVED_REFERENCE{PSI}!>myRun<!> {
materialize()
}
}
\ No newline at end of file
}<!>
}
......@@ -31,33 +31,33 @@ fun test_3() {
fun takeByte(b: Byte) {}
fun test_4() {
<!INAPPLICABLE_CANDIDATE!>takeByte<!>(1 + 1)
<!INAPPLICABLE_CANDIDATE!>takeByte<!>(1 + 127)
<!INAPPLICABLE_CANDIDATE!>takeByte<!>(1 - 1)
<!INAPPLICABLE_CANDIDATE!>takeByte<!>(-100 - 100)
<!INAPPLICABLE_CANDIDATE!>takeByte<!>(10 * 10)
<!INAPPLICABLE_CANDIDATE!>takeByte<!>(100 * 100)
<!UNRESOLVED_REFERENCE!>taleByte<!>(10 / 10)
<!INAPPLICABLE_CANDIDATE!>takeByte<!>(100 % 10)
<!INAPPLICABLE_CANDIDATE!>takeByte<!>(1000 % 10)
<!INAPPLICABLE_CANDIDATE!>takeByte<!>(1000 and 100)
<!INAPPLICABLE_CANDIDATE!>takeByte<!>(128 and 511)
<!INAPPLICABLE_CANDIDATE!>takeByte<!>(100 or 100)
<!INAPPLICABLE_CANDIDATE!>takeByte<!>(1000 or 0)
<!INAPPLICABLE_CANDIDATE!>takeByte<!>(511 xor 511)
<!INAPPLICABLE_CANDIDATE!>takeByte<!>(512 xor 511)
<!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>takeByte<!>(1 + 1)<!>
<!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>takeByte<!>(1 + 127)<!>
<!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>takeByte<!>(1 - 1)<!>
<!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>takeByte<!>(-100 - 100)<!>
<!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>takeByte<!>(10 * 10)<!>
<!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>takeByte<!>(100 * 100)<!>
<!UNRESOLVED_REFERENCE{LT}!><!UNRESOLVED_REFERENCE{PSI}!>taleByte<!>(10 / 10)<!>
<!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>takeByte<!>(100 % 10)<!>
<!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>takeByte<!>(1000 % 10)<!>
<!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>takeByte<!>(1000 and 100)<!>
<!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>takeByte<!>(128 and 511)<!>
<!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>takeByte<!>(100 or 100)<!>
<!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>takeByte<!>(1000 or 0)<!>
<!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>takeByte<!>(511 xor 511)<!>
<!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>takeByte<!>(512 xor 511)<!>
}
fun test_5() {
takeByte(-1)
takeByte(+1)
<!INAPPLICABLE_CANDIDATE!>takeByte<!>(1.inv())
<!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>takeByte<!>(1.inv())<!>
}
fun test_6() {
<!INAPPLICABLE_CANDIDATE!>takeByte<!>(run { 127 + 1 })
<!INAPPLICABLE_CANDIDATE!>takeByte<!>(1 + run { 1 })
<!INAPPLICABLE_CANDIDATE!>takeByte<!>(run { 1 + 1 })
<!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>takeByte<!>(run { 127 + 1 })<!>
<!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>takeByte<!>(1 + run { 1 })<!>
<!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>takeByte<!>(run { 1 + 1 })<!>
1 + 1
run { 1 }
1 + run { 1 }
......
......@@ -14,4 +14,4 @@ fun takeInt(x: Int) {}
fun test(d: D) {
val x = d.foo()
takeInt(x)
}
\ No newline at end of file
}
......@@ -5,4 +5,4 @@ interface A {
fun test(a: A) {
a.foo { true }
}
\ No newline at end of file
}
......@@ -7,11 +7,11 @@ fun test() {
foo(1, second = 3.14, third = false, fourth = "!?")
foo(third = false, second = 2.71, fourth = "?!", first = 0)
<!INAPPLICABLE_CANDIDATE!>foo<!>()
<!INAPPLICABLE_CANDIDATE!>foo<!>(0.0, false, 0, "")
<!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>foo<!>()<!>
<!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>foo<!>(0.0, false, 0, "")<!>
foo(1, 2.0, third = true, "")
<!INAPPLICABLE_CANDIDATE!>foo<!>(second = 0.0, first = 0, fourth = "")
<!INAPPLICABLE_CANDIDATE!>foo<!>(first = 0.0, second = 0, third = "", fourth = false)
<!INAPPLICABLE_CANDIDATE!>foo<!>(first = 0, second = 0.0, third = false, fourth = "", first = 1)
<!INAPPLICABLE_CANDIDATE!>foo<!>(0, 0.0, false, foth = "")
}
\ No newline at end of file
<!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>foo<!>(second = 0.0, first = 0, fourth = "")<!>
<!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>foo<!>(first = 0.0, second = 0, third = "", fourth = false)<!>
<!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>foo<!>(first = 0, second = 0.0, third = false, fourth = "", first = 1)<!>
<!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>foo<!>(0, 0.0, false, foth = "")<!>
}
......@@ -4,4 +4,4 @@ fun foo(s: String) {}
fun test(a: A) {
foo("$a")
}
\ No newline at end of file
}
......@@ -10,4 +10,4 @@ fun test() {
foo()
}
}
}
\ No newline at end of file
}
......@@ -7,11 +7,11 @@ fun test() {
foo(1, "my", "yours")
foo(1, *arrayOf("my", "yours"))
<!INAPPLICABLE_CANDIDATE!>foo<!>("")
<!INAPPLICABLE_CANDIDATE!>foo<!>(1, 2)
<!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>foo<!>("")<!>
<!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>foo<!>(1, 2)<!>
bar(1, z = true, y = *arrayOf("my", "yours"))
<!INAPPLICABLE_CANDIDATE!>bar<!>(0, z = false, y = "", y = "other")
<!INAPPLICABLE_CANDIDATE!>bar<!>(0, "", true)
<!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>bar<!>(0, z = false, y = "", y = "other")<!>
<!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>bar<!>(0, "", true)<!>
}
......@@ -6,4 +6,4 @@ fun foo(vararg arg: Base) {}
fun bar(base: Array<Base>, sub: Array<Sub>) {
foo(*base)
foo(*sub)
}
\ No newline at end of file
}
......@@ -28,4 +28,4 @@ fun test_2(a: A<C>) {
fun test_3(a: A<D>) {
a[0] = D() // set
}
\ No newline at end of file
}
......@@ -33,4 +33,4 @@ fun test_3(a: A<D>) {
fun test_4(b: B) {
<!UNRESOLVED_REFERENCE!><!UNRESOLVED_REFERENCE!>b[0]<!> += B()<!> // unresolved
}
\ No newline at end of file
}
......@@ -11,11 +11,11 @@ class A {
import foo.A as B
fun test_1() {
val a = <!UNRESOLVED_REFERENCE!>A<!>()
val a = <!UNRESOLVED_REFERENCE{LT}!><!UNRESOLVED_REFERENCE{PSI}!>A<!>()<!>
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) {
b.foo()
}
\ No newline at end of file
}
......@@ -2,4 +2,4 @@ abstract class MyStringList : List<String>
abstract class MyMutableStringList : MutableList<String>
fun List<String>.convert(): MyStringList = this as MyStringList
fun ret(l: MutableList<String>): MyMutableStringList = l as MyMutableStringList
\ No newline at end of file
fun ret(l: MutableList<String>): MyMutableStringList = l as MyMutableStringList
......@@ -9,11 +9,11 @@ fun bar(x: B) {}
fun test(c: C) {
// Argument mapping error
<!INAPPLICABLE_CANDIDATE!>foo<!>("")
<!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>foo<!>("")<!>
// Ambiguity
<!AMBIGUITY!>bar<!>(c)
<!AMBIGUITY{LT}!><!AMBIGUITY{PSI}!>bar<!>(c)<!>
// Unresolved reference
<!UNRESOLVED_REFERENCE!>baz<!>()
}
\ No newline at end of file
<!UNRESOLVED_REFERENCE{LT}!><!UNRESOLVED_REFERENCE{PSI}!>baz<!>()<!>
}
......@@ -26,4 +26,4 @@ class Outer<E> {
}
fun bar(i: Inner) {}
}
\ No newline at end of file
}
......@@ -9,6 +9,6 @@ fun main1() {
}
fun main2() {
{ "" }.<!INAPPLICABLE_CANDIDATE!>bar<!>()
{ "" }.<!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>bar<!>()<!>
"".bar()
}
......@@ -4,4 +4,4 @@ val y = 2 as Any
val f = fun() = 3 as Any
val g = {}
val h: (String) -> Boolean = { _ -> false }
val hError = { _ -> true }
\ No newline at end of file
val hError = { _ -> true }
......@@ -13,4 +13,4 @@ fun foo(b: Boolean) {
bar()
}
fun bar() {}
\ No newline at end of file
fun bar() {}
......@@ -45,4 +45,4 @@ fun test_8(b: Boolean) {
if (true && b) {
1
}
}
\ No newline at end of file
}
......@@ -19,4 +19,4 @@ internal fun AutoCloseable?.closeFinally(cause: Throwable?) = when {
inline fun <reified T : Any> List<*>.firstIsInstanceOrNull(): T? {
for (element in this) if (element is T) return element
return null
}
\ No newline at end of file
}
......@@ -9,4 +9,4 @@ fun test_2(x: Int) {
fun test_3(x: Int) {
when (val y = x) {}
}
\ No newline at end of file
}
......@@ -19,7 +19,7 @@ fun test_2(x: Any, y: Any) {
val a = select(
id(
run {
y.<!UNRESOLVED_REFERENCE!>inc<!>() // Bad
y.<!UNRESOLVED_REFERENCE{LT}!><!UNRESOLVED_REFERENCE{PSI}!>inc<!>()<!> // Bad
x as Int
}
),
......@@ -39,14 +39,14 @@ fun test_3(x: Any, y: Any) {
val a = select(
id(
run {
y.<!UNRESOLVED_REFERENCE!>inc<!>() // Bad
y.<!UNRESOLVED_REFERENCE{LT}!><!UNRESOLVED_REFERENCE{PSI}!>inc<!>()<!> // Bad
x as Int
materialize()
}
),
run {
y as Int
x.<!UNRESOLVED_REFERENCE!>inc<!>() // Bad
x.<!UNRESOLVED_REFERENCE{LT}!><!UNRESOLVED_REFERENCE{PSI}!>inc<!>()<!> // Bad
y.inc() // OK
1
}
......@@ -60,19 +60,19 @@ fun test_4(x: Any, y: Any) {
val a = select(
id(
myRun {
y.<!UNRESOLVED_REFERENCE!>inc<!>() // Bad
y.<!UNRESOLVED_REFERENCE{LT}!><!UNRESOLVED_REFERENCE{PSI}!>inc<!>()<!> // Bad
x as Int
}
),
y as Int,
myRun {
x.<!UNRESOLVED_REFERENCE!>inc<!>() // Bad
x.<!UNRESOLVED_REFERENCE{LT}!><!UNRESOLVED_REFERENCE{PSI}!>inc<!>()<!> // Bad
y.inc() // OK
1
}
)
<!INAPPLICABLE_CANDIDATE!>takeInt<!>(x) // Bad
<!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>takeInt<!>(x)<!> // Bad
takeInt(y) // OK
takeInt(a) // Bad
}
......@@ -90,4 +90,4 @@ fun test_6() {
}
}
)
}
\ No newline at end of file
}
......@@ -11,4 +11,4 @@ class Bar {
throw Exception()
val y = 2
}
}
\ No newline at end of file
}
......@@ -11,4 +11,4 @@ class C(a: A, b: B) {
C(a, it)
}
}
}
\ No newline at end of file
}
......@@ -15,7 +15,7 @@ fun test_2(x: Int?) {
} else {
x
}
y.<!INAPPLICABLE_CANDIDATE!>inc<!>()
y.<!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>inc<!>()<!>
}
fun test_3(x: Int?) {
......@@ -50,4 +50,4 @@ fun test_6() {
run {
return@run
}
}
\ No newline at end of file
}
......@@ -65,4 +65,4 @@ fun testDoWhileFalse() {
1
} while (false)
1
}
\ No newline at end of file
}
......@@ -6,4 +6,4 @@ class B(val s: String) : A(s.let { { it } }) {
fun foo() {
foo()
}
}
\ No newline at end of file
}
......@@ -3,4 +3,4 @@ inline fun foo(vararg x: Any) {}
fun test(a: Any, b: Any, c: Any) {
foo(a, { "" }, b)
}
\ No newline at end of file
}
......@@ -40,4 +40,4 @@ val x4 = try {
2
} finally {
0
}
\ No newline at end of file
}
......@@ -19,4 +19,4 @@ fun test_2() {
fun test_3() {
val x = run { return }
}
\ No newline at end of file
}
......@@ -5,4 +5,4 @@ fun test() {
val x = 1
val y = x + 1
foo()
}
\ No newline at end of file
}
......@@ -31,4 +31,4 @@ fun test_3(b: Boolean) {
val y = 2
}
val z = 3
}
\ No newline at end of file
}
......@@ -15,4 +15,4 @@ fun test_2(x: Any?) {
if (x is A && x is B) {
x is A
}
}
\ No newline at end of file
}
......@@ -14,4 +14,4 @@ abstract class Another {
}
abstract val x: InCompanion
}
\ No newline at end of file
}
......@@ -15,4 +15,4 @@ class Derived : Base() {
val dd: DerivedNested = DerivedNested()
}
}
}
\ No newline at end of file
}
......@@ -24,4 +24,4 @@ typealias DDD = C
class CKt : QQQ, DDD {
constructor(s: String) : super(s)
}
\ No newline at end of file
}
......@@ -5,4 +5,4 @@ fun test(some: Some) {
val another = some.copy(x = 123)
val same = some.copy()
val different = some.copy(456, "456")
}
\ No newline at end of file
}
......@@ -20,4 +20,4 @@ fun foo(element: PsiElement, usages: Array<UsageInfo>) {
val adjusted = if (element is KtParameter) usages.filterNot {
it.usage is KtLightMethod
} else usages.toList()
}
\ No newline at end of file
}
......@@ -6,4 +6,4 @@ class B : A {
override fun foo() {}
}
class C(val b: B) : A by b
\ No newline at end of file
class C(val b: B) : A by b
......@@ -24,4 +24,4 @@ class Test {
fun test() {
var x: Boolean by LocalFreezableVar(true)
var y by LocalFreezableVar("")
}
\ No newline at end of file
}
......@@ -13,4 +13,4 @@ class Test {
val y = getAny() as? String ?: ""
y
}
}
\ No newline at end of file
}
......@@ -5,4 +5,4 @@ inline fun <L> runLogged(action: () -> L): L {
operator fun <V> V.getValue(receiver: Any?, p: Any): V =
runLogged { this }
val testK by runLogged { "K" }
\ No newline at end of file
val testK by runLogged { "K" }
......@@ -5,4 +5,4 @@ inline fun <L> runLogged(action: () -> L): L {
operator fun String.getValue(receiver: Any?, p: Any): String =
runLogged { this }
val testK by runLogged { "K" }
\ No newline at end of file
val testK by runLogged { "K" }
......@@ -16,4 +16,4 @@ fun <T> delegate(value: T): DelegateProvider<T> = DelegateProvider(value)
class A {
val x by delegate(1)
}
\ No newline at end of file
}
......@@ -10,18 +10,18 @@ open class A3(x: String, y: String = "") {
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_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)
class B4 : <!INAPPLICABLE_CANDIDATE!>A4<!>( 1 + 1)
class B4 : <!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>A4<!>( 1 + 1)<!>
open class A5 {
constructor(x: Byte)
constructor(x: Short)
}
class B5_1 : <!NONE_APPLICABLE!>A5<!>(1 + 1)
class B5_2 : <!NONE_APPLICABLE!>A5<!>(100 * 2)
class B5_1 : <!NONE_APPLICABLE{LT}!><!NONE_APPLICABLE{PSI}!>A5<!>(1 + 1)<!>
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)
typealias Alias<X> = Inv<X, Inv<X, X>>
class InvImpl : Alias<String>("", Inv("", ""))
\ No newline at end of file
class InvImpl : Alias<String>("", Inv("", ""))
......@@ -2,4 +2,4 @@ open class Base<T1>(val x: T1)
class Derived<T2 : Any>(x: T2) : Base<T2>(x)
fun <T3 : Any> create(x: T3) /* Derived<T3> */ = Derived(x)
\ No newline at end of file
fun <T3 : Any> create(x: T3) /* Derived<T3> */ = Derived(x)
......@@ -22,7 +22,7 @@ class B : A() {
}
fun g() {
super.<!ABSTRACT_SUPER_CALL!>f<!>()
super.<!ABSTRACT_SUPER_CALL{LT}!><!ABSTRACT_SUPER_CALL{PSI}!>f<!>()<!>
super.t()
super.x
......@@ -32,7 +32,7 @@ class B : A() {
abstract class J : A() {
fun r() {
super.<!ABSTRACT_SUPER_CALL!>f<!>()
super.<!ABSTRACT_SUPER_CALL{LT}!><!ABSTRACT_SUPER_CALL{PSI}!>f<!>()<!>
super.t()
super.x
......
......@@ -13,5 +13,5 @@ open class B {
class A : IWithToString, B() {
override fun toString(): String = super.toString() // resolve to Any.toString
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 {
)<!>
)
@Ann3(<!ANNOTATION_ARGUMENT_MUST_BE_CONST!>arr<!>)
fun test() {}
\ No newline at end of file
fun test() {}
......@@ -8,4 +8,4 @@ val foo = TestEnum.Foo
var bar = TestEnum.Foo
@Ann(<!ANNOTATION_ARGUMENT_MUST_BE_ENUM_CONST!>foo<!>, <!ANNOTATION_ARGUMENT_MUST_BE_ENUM_CONST!>bar<!>)
fun test() {}
\ No newline at end of file
fun test() {}
......@@ -21,4 +21,4 @@ fun bar() = Foo::class
<!ANNOTATION_ARGUMENT_MUST_BE_KCLASS_LITERAL!>bar()<!>
]
)
fun test1() {}
\ No newline at end of file
fun test1() {}
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!>fun foo() {}<!>
<!ANNOTATION_CLASS_MEMBER!>val bar: Nothing?<!>
<!ANNOTATION_CLASS_MEMBER!>val baz get() = Unit<!>
}
\ No newline at end of file
}
......@@ -14,4 +14,4 @@ fun A.test_2() {
object : B by b {}
}
class D(val x: String, val y: String = <!NO_THIS!>this<!>.<!UNRESOLVED_REFERENCE!>x<!>) {}
\ No newline at end of file
class D(val x: String, val y: String = <!NO_THIS!>this<!>.<!UNRESOLVED_REFERENCE!>x<!>) {}
......@@ -2,4 +2,4 @@ class A
interface C
enum class B : C, <!CLASS_IN_SUPERTYPE_FOR_ENUM!>A<!>(), Any()
\ No newline at end of file
enum class B : C, <!CLASS_IN_SUPERTYPE_FOR_ENUM!>A<!>(), Any()
......@@ -49,7 +49,7 @@ fun lol(a: Array<Boolean>) {}
<!CONFLICTING_OVERLOADS!>fun <T> mem(t: T) where T : String, T : () -> Boolean {}<!>
class M {
companion <!REDECLARATION!>object<!> {}
<!REDECLARATION{LT}!>companion <!REDECLARATION{PSI}!>object<!> {}<!>
<!REDECLARATION!>val Companion = object : Any {}<!>
}
......@@ -65,4 +65,4 @@ class mest
fun() {}
private fun() {}
\ No newline at end of file
private fun() {}
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 {
<!CONSTRUCTOR_IN_INTERFACE!>constructor(val s: String)<!> {}
}
\ No newline at end of file
<!CONSTRUCTOR_IN_INTERFACE{LT}!><!CONSTRUCTOR_IN_INTERFACE{PSI}!>constructor(val s: String)<!> {}<!>
}
......@@ -2,14 +2,14 @@ class B
class C
class A() {
constructor(a: Int) : <!CYCLIC_CONSTRUCTOR_DELEGATION_CALL!>this<!>("test") {}
constructor(a: String) : <!CYCLIC_CONSTRUCTOR_DELEGATION_CALL!>this<!>(10) {}
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: 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(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(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(a: List<Int>) : this(C()) {}
......@@ -17,7 +17,7 @@ class A() {
class D {
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> {
......@@ -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!>this<!>(i, 10) {}
constructor(e: T, i: Int) : <!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>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!>this<!>(i, 10)
constructor(e: T, i: Int) : <!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>this<!>(i, 10)<!>
}
class J<T> {
......@@ -42,20 +42,20 @@ class J<T> {
}
class F(s: String) {
<!PRIMARY_CONSTRUCTOR_DELEGATION_CALL_EXPECTED!>constructor(i: Boolean)<!> {}
constructor(i: Int) : <!CYCLIC_CONSTRUCTOR_DELEGATION_CALL!>this<!>(3) {}
<!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)<!> {}
}
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) {
<!PRIMARY_CONSTRUCTOR_DELEGATION_CALL_EXPECTED!>constructor()<!>
<!PRIMARY_CONSTRUCTOR_DELEGATION_CALL_EXPECTED{PSI}!>constructor()<!><!PRIMARY_CONSTRUCTOR_DELEGATION_CALL_EXPECTED{LT}!><!>
}
class K(x: Int) {
constructor() : <!CYCLIC_CONSTRUCTOR_DELEGATION_CALL!>this<!>() {}
constructor() : <!CYCLIC_CONSTRUCTOR_DELEGATION_CALL{LT}!><!CYCLIC_CONSTRUCTOR_DELEGATION_CALL{PSI}!>this<!>()<!> {}
}
class M {
......@@ -63,5 +63,5 @@ class 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 {
val test = A()
interface C : <!DELEGATION_IN_INTERFACE, INTERFACE_WITH_SUPERCLASS!>A<!> by test
\ No newline at end of file
interface C : <!DELEGATION_IN_INTERFACE, INTERFACE_WITH_SUPERCLASS!>A<!> by test
enum class A {
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)
}
\ No newline at end of file
}
......@@ -3,16 +3,16 @@ class A(x: Int) {
}
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()
}
<!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()
}<!>
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()
}
\ No newline at end of file
}
......@@ -35,4 +35,4 @@ fun rest() {
<!INAPPLICABLE_LATEINIT_MODIFIER!>lateinit var i: Int<!>
lateinit var a: A
<!INAPPLICABLE_LATEINIT_MODIFIER!>lateinit var b: B<String> = B()<!>
}
\ No newline at end of file
}
......@@ -28,4 +28,4 @@ private abstract class M : K()
class X {
<!INCOMPATIBLE_MODIFIERS!>inner<!> <!INCOMPATIBLE_MODIFIERS!>data<!> class Y(val i: Int)
<!INCOMPATIBLE_MODIFIERS!>sealed<!> <!INCOMPATIBLE_MODIFIERS!>inner<!> class Z
}
\ No newline at end of file
}
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
var keker = "test"
}
......@@ -7,10 +7,10 @@ class A {
class B(other: B = <!NO_THIS!>this<!>)
class C() {
constructor(x: Int) : <!INAPPLICABLE_CANDIDATE!>this<!>({
constructor(x: Int) : <!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>this<!>({
val a = 10
<!INSTANCE_ACCESS_BEFORE_SUPER_CALL!>this<!>
}) {}
})<!> {}
}
class D {
......
......@@ -5,4 +5,4 @@ interface B : <!INTERFACE_WITH_SUPERCLASS, SUPERTYPE_INITIALIZED_IN_INTERFACE!>A
interface C
class D
interface E : <!INTERFACE_WITH_SUPERCLASS, SUPERTYPE_INITIALIZED_IN_INTERFACE!>A<!>(), C, <!SUPERTYPE_INITIALIZED_IN_INTERFACE!>D<!>()
\ No newline at end of file
interface E : <!INTERFACE_WITH_SUPERCLASS, SUPERTYPE_INITIALIZED_IN_INTERFACE!>A<!>(), C, <!SUPERTYPE_INITIALIZED_IN_INTERFACE!>D<!>()
......@@ -2,7 +2,7 @@ fun foo() {
<!LOCAL_ANNOTATION_CLASS_ERROR!>annotation class Ann<!>
@Ann class Local {
// There should also be NESTED_CLASS_NOT_ALLOWED report here.
<!LOCAL_ANNOTATION_CLASS_ERROR!>annotation class Nested<!>
<!LOCAL_ANNOTATION_CLASS_ERROR{LT}!>// There should also be NESTED_CLASS_NOT_ALLOWED report here.
<!LOCAL_ANNOTATION_CLASS_ERROR{PSI}!>annotation class Nested<!><!>
}
}
......@@ -6,19 +6,19 @@ object A {
interface X
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_INTERFACE_NOT_ALLOWED!>interface Z<!>
}
}<!>
<!LOCAL_INTERFACE_NOT_ALLOWED!>interface Y<!>
}
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_INTERFACE_NOT_ALLOWED!>interface M<!>
}
}<!>
<!LOCAL_INTERFACE_NOT_ALLOWED!>interface N<!>
......@@ -28,4 +28,4 @@ object A {
<!LOCAL_INTERFACE_NOT_ALLOWED!>interface U<!>
}
}
}
\ No newline at end of file
}
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 {
......@@ -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 {
override operator fun toString(): String
override operator fun equals(other: Any?): Boolean
override operator fun hashCode(): Int
}
\ No newline at end of file
}
......@@ -10,4 +10,4 @@ const val cnst = 2
<!NON_CONST_VAL_USED_IN_CONSTANT_EXPRESSION!>foo + cnst.toString()<!>
)<!>
)
fun test() {}
\ No newline at end of file
fun test() {}
......@@ -4,7 +4,7 @@ class A {
class B : A {
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()
}
}
\ No newline at end of file
}
......@@ -6,4 +6,4 @@ data class A {}
<!PRIMARY_CONSTRUCTOR_REQUIRED_FOR_DATA_CLASS!>data class C {
constructor(x: Int)
}<!>
\ No newline at end of file
}<!>
......@@ -26,7 +26,7 @@ class G<E : Double>(val balue: E) : F<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
}
......
......@@ -31,4 +31,4 @@ class Test2 : IDerived<String>, AliasedIBase {
super<IDerived>.bar()
super<IDerived>.qux()
}
}
\ No newline at end of file
}
<!REDUNDANT_MODIFIER!>open<!> abstract class A
<!REDUNDANT_MODIFIER!>abstract<!> sealed class B
\ No newline at end of file
<!REDUNDANT_MODIFIER!>abstract<!> sealed class B
......@@ -14,4 +14,4 @@ enum <!REPEATED_MODIFIER!>enum<!> class C {
open class E(private <!REPEATED_MODIFIER!>private<!> val int: Int = 5) {
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) {
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
}
......@@ -66,4 +66,4 @@ open class GoodDerrived : Base<Y, W>() {
open class BadDerrived : Base<Y, W>() {
override fun kek(): <!RETURN_TYPE_MISMATCH_ON_OVERRIDE!>String<!> = "test"
}
\ No newline at end of file
}
sealed class A
val b = <!SEALED_CLASS_CONSTRUCTOR_CALL!>A<!>()
\ No newline at end of file
val b = <!SEALED_CLASS_CONSTRUCTOR_CALL{LT}!><!SEALED_CLASS_CONSTRUCTOR_CALL{PSI}!>A<!>()<!>
......@@ -28,13 +28,13 @@ sealed class P {
class K : P()
<!REDECLARATION!>object B<!> {
<!REDECLARATION{LT}!><!REDECLARATION{PSI}!>object B<!> {
class I : <!SEALED_SUPERTYPE!>P<!>()
}
}<!>
fun test() {
class L : <!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) {
// Should be resolved to delegated B.foo (no error)
super.foo()
}
}
\ No newline at end of file
}
......@@ -4,7 +4,7 @@ class B: A() {
fun act() {
<!SUPER_IS_NOT_AN_EXPRESSION!>super<!>()
<!UNRESOLVED_REFERENCE!>invoke<!>()
<!UNRESOLVED_REFERENCE{LT}!><!UNRESOLVED_REFERENCE{PSI}!>invoke<!>()<!>
<!SUPER_IS_NOT_AN_EXPRESSION!>super<!> {
println(<!ILLEGAL_CONST_EXPRESSION!>'weird'<!>)
......
fun String.f() {
<!SUPER_NOT_AVAILABLE!>super@f<!>.<!UNRESOLVED_REFERENCE!>compareTo<!>("")
<!SUPER_NOT_AVAILABLE!>super<!>.<!UNRESOLVED_REFERENCE!>compareTo<!>("")
<!SUPER_NOT_AVAILABLE!>super@f<!>.<!UNRESOLVED_REFERENCE{LT}!><!UNRESOLVED_REFERENCE{PSI}!>compareTo<!>("")<!>
<!SUPER_NOT_AVAILABLE!>super<!>.<!UNRESOLVED_REFERENCE{LT}!><!UNRESOLVED_REFERENCE{PSI}!>compareTo<!>("")<!>
}
fun foo() {
<!SUPER_NOT_AVAILABLE!>super<!>
<!SUPER_NOT_AVAILABLE!>super<!>.<!UNRESOLVED_REFERENCE!>foo<!>()
<!SUPER_NOT_AVAILABLE!>super<Nothing><!>.<!UNRESOLVED_REFERENCE!>foo<!>()
<!SUPER_NOT_AVAILABLE!>super<!>.<!UNRESOLVED_REFERENCE{LT}!><!UNRESOLVED_REFERENCE{PSI}!>foo<!>()<!>
<!SUPER_NOT_AVAILABLE!>super<Nothing><!>.<!UNRESOLVED_REFERENCE{LT}!><!UNRESOLVED_REFERENCE{PSI}!>foo<!>()<!>
}
class A {
fun act() {
<!UNRESOLVED_REFERENCE!>println<!>("Test")
<!UNRESOLVED_REFERENCE{LT}!><!UNRESOLVED_REFERENCE{PSI}!>println<!>("Test")<!>
}
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<!> {
override fun 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
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)
<!SUPERTYPE_INITIALIZED_WITHOUT_PRIMARY_CONSTRUCTOR!>class G : C(10) {
constructor() : super(1)
}<!>
\ No newline at end of file
}<!>
......@@ -19,4 +19,4 @@ package simulation
)
class KotlinImporterComponent {
class State(var directories: List<String> = ArrayList())
}
\ No newline at end of file
}
......@@ -17,11 +17,11 @@ object Best {
}
val a = <!TYPE_ARGUMENTS_NOT_ALLOWED!>rest<Int><!>.<!UNRESOLVED_REFERENCE!>MyClass<!><String>
val b = Best.<!UNRESOLVED_REFERENCE!>MyClass<!><String>
val a = <!TYPE_ARGUMENTS_NOT_ALLOWED!>rest<Int><!>.<!UNRESOLVED_REFERENCE{LT}!><!UNRESOLVED_REFERENCE{PSI}!>MyClass<!><String><!>
val b = Best.<!UNRESOLVED_REFERENCE{LT}!><!UNRESOLVED_REFERENCE{PSI}!>MyClass<!><String><!>
class B<E>
class C<F<!SYNTAX!><<!><!SYNTAX!>Boolean<!><!SYNTAX!>><!><!SYNTAX!>><!> <!SYNTAX!>:<!> <!SYNTAX!>B<!><!SYNTAX!><<!><!SYNTAX!>F<!><!SYNTAX!><<!><!SYNTAX!>Boolean<!><!SYNTAX!>><!><!SYNTAX!>><!><!SYNTAX!>(<!><!SYNTAX!>)<!>
class C<F<!SYNTAX{PSI}!><<!><!SYNTAX{PSI}!>Boolean<!><!SYNTAX{PSI}!>><!><!SYNTAX{PSI}!>><!> <!SYNTAX{PSI}!>:<!> <!SYNTAX{PSI}!>B<!><!SYNTAX{PSI}!><<!><!SYNTAX{PSI}!>F<!><!SYNTAX{PSI}!><<!><!SYNTAX{PSI}!>Boolean<!><!SYNTAX{PSI}!>><!><!SYNTAX{PSI}!>><!><!SYNTAX{PSI}!>(<!><!SYNTAX{PSI}!>)<!>
fun <G> gest() {}
......@@ -31,4 +31,4 @@ fun <T> fest() {
gest<T>()
val c: List<List<List<<!TYPE_ARGUMENTS_NOT_ALLOWED!>T<String><!>>>>
gest<List<List<<!TYPE_ARGUMENTS_NOT_ALLOWED!>T<Boolean><!>>>>()
}
\ No newline at end of file
}
......@@ -20,4 +20,4 @@ annotation class Ann2(
val p4: <!NULLABLE_TYPE_OF_ANNOTATION_MEMBER!>Array<Int>?<!>,
val p5: <!NULLABLE_TYPE_OF_ANNOTATION_MEMBER!>Ann1?<!>,
val p6: <!NULLABLE_TYPE_OF_ANNOTATION_MEMBER!>Enum?<!>
)
\ No newline at end of file
)
enum class A<<!TYPE_PARAMETERS_IN_ENUM!>B<!>, C : B, D>
enum class B
\ No newline at end of file
enum class B
<!TYPE_PARAMETERS_IN_OBJECT!>object A<!><T, K : T> {
<!TYPE_PARAMETERS_IN_OBJECT!>object B<!><L>
}
<!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><!>
}<!>
class N {
companion <!TYPE_PARAMETERS_IN_OBJECT!>object<!><T> {
<!TYPE_PARAMETERS_IN_OBJECT{LT}!>companion <!TYPE_PARAMETERS_IN_OBJECT{PSI}!>object<!><T> {
}
}<!>
}
fun test() {
<!LOCAL_OBJECT_NOT_ALLOWED, TYPE_PARAMETERS_IN_OBJECT!>object M<!><H> {
<!LOCAL_OBJECT_NOT_ALLOWED{LT}, TYPE_PARAMETERS_IN_OBJECT{LT}!><!LOCAL_OBJECT_NOT_ALLOWED{PSI}, TYPE_PARAMETERS_IN_OBJECT{PSI}!>object M<!><H> {
}
}
\ No newline at end of file
}<!>
}
......@@ -45,4 +45,4 @@ val test8 = NL<String>()
class NumberPhile<T: Number>(x: T)
val np1 = NumberPhile(10)
val np2 = <!INAPPLICABLE_CANDIDATE!>NumberPhile<!>("Test")
val np2 = <!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>NumberPhile<!>("Test")<!>
annotation class A(
<!VAR_ANNOTATION_PARAMETER!>var<!> a: Int,
<!VAR_ANNOTATION_PARAMETER{LT}!><!VAR_ANNOTATION_PARAMETER{PSI}!>var<!> a: Int<!>,
<!MISSING_VAL_ON_ANNOTATION_PARAMETER!>b: String<!>
)
\ No newline at end of file
)
......@@ -34,4 +34,4 @@ enum class EnumClass {
abstract fun foo(): Int
abstract val bar: String
}
\ No newline at end of file
}
......@@ -35,4 +35,4 @@ fun test_3() {
SomeEnum.A2 -> B()
}
takeB(b) // should be OK
}
\ No newline at end of file
}
......@@ -22,4 +22,4 @@ fun test_2(b: Boolean?) {
false -> 2
null -> 3
}
}
\ No newline at end of file
}
......@@ -53,4 +53,4 @@ fun test_3(e: Enum) {
Enum.A, Enum.B -> 1
Enum.C -> 2
}
}
\ No newline at end of file
}
......@@ -10,13 +10,13 @@ fun test_1(e: JavaEnum) {
val a = when (e) {
JavaEnum.A -> 1
JavaEnum.B -> 2
}.<!UNRESOLVED_REFERENCE!>plus<!>(0)
}.<!UNRESOLVED_REFERENCE{LT}!><!UNRESOLVED_REFERENCE{PSI}!>plus<!>(0)<!>
val b = when (e) {
JavaEnum.A -> 1
JavaEnum.B -> 2
is String -> 3
}.<!UNRESOLVED_REFERENCE!>plus<!>(0)
}.<!UNRESOLVED_REFERENCE{LT}!><!UNRESOLVED_REFERENCE{PSI}!>plus<!>(0)<!>
val c = when (e) {
JavaEnum.A -> 1
......@@ -35,7 +35,7 @@ fun test_2(e: JavaEnum?) {
JavaEnum.A -> 1
JavaEnum.B -> 2
JavaEnum.C -> 3
}.<!UNRESOLVED_REFERENCE!>plus<!>(0)
}.<!UNRESOLVED_REFERENCE{LT}!><!UNRESOLVED_REFERENCE{PSI}!>plus<!>(0)<!>
val a = when (e) {
JavaEnum.A -> 1
......@@ -57,4 +57,4 @@ fun test_3(e: JavaEnum) {
JavaEnum.A, JavaEnum.B -> 1
JavaEnum.C -> 2
}.plus(0)
}
\ No newline at end of file
}
......@@ -57,4 +57,4 @@ fun test_3(e: Base) {
is Base.A, is Base.A.B -> 1
is C -> 2
}
}
\ No newline at end of file
}
......@@ -21,4 +21,4 @@ fun test_2(a: A) {
C -> ""
}
takeString(s)
}
\ No newline at end of file
}
......@@ -35,20 +35,20 @@ fun test_2(e: A) {
val a = when (e) {
is D -> 1
is E -> 2
}.<!UNRESOLVED_REFERENCE!>plus<!>(0)
}.<!UNRESOLVED_REFERENCE{LT}!><!UNRESOLVED_REFERENCE{PSI}!>plus<!>(0)<!>
val b = when (e) {
is B -> 1
is D -> 2
is E -> 3
}.<!UNRESOLVED_REFERENCE!>plus<!>(0)
}.<!UNRESOLVED_REFERENCE{LT}!><!UNRESOLVED_REFERENCE{PSI}!>plus<!>(0)<!>
val c = when (e) {
is B -> 1
is D -> 2
}.<!UNRESOLVED_REFERENCE!>plus<!>(0)
}.<!UNRESOLVED_REFERENCE{LT}!><!UNRESOLVED_REFERENCE{PSI}!>plus<!>(0)<!>
val d = when (e) {
is C -> 1
}.<!UNRESOLVED_REFERENCE!>plus<!>(0)
}.<!UNRESOLVED_REFERENCE{LT}!><!UNRESOLVED_REFERENCE{PSI}!>plus<!>(0)<!>
}
......@@ -14,27 +14,27 @@ class CallBasedInExpressionGenerator(
val codegen: ExpressionCodegen,
operatorReference: KtSimpleNameExpression
) : InExpressionGenerator {
private val resolvedCall = operatorReference.<!UNRESOLVED_REFERENCE!>getResolvedCallWithAssert<!>(codegen.<!UNRESOLVED_REFERENCE!>bindingContext<!>)
private val isInverted = operatorReference.<!UNRESOLVED_REFERENCE!>getReferencedNameElementType<!>() == <!UNRESOLVED_REFERENCE!>KtTokens<!>.<!UNRESOLVED_REFERENCE!>NOT_IN<!>
private val resolvedCall = operatorReference.<!UNRESOLVED_REFERENCE{LT}!><!UNRESOLVED_REFERENCE{PSI}!>getResolvedCallWithAssert<!>(codegen.<!UNRESOLVED_REFERENCE!>bindingContext<!>)<!>
private val isInverted = operatorReference.<!UNRESOLVED_REFERENCE{LT}!><!UNRESOLVED_REFERENCE{PSI}!>getReferencedNameElementType<!>()<!> == <!UNRESOLVED_REFERENCE!>KtTokens<!>.<!UNRESOLVED_REFERENCE!>NOT_IN<!>
override fun generate(argument: StackValue): BranchedValue =
gen(argument).let { if (isInverted) <!UNRESOLVED_REFERENCE!>Invert<!>(it) else it }
gen(argument).let { if (isInverted) <!UNRESOLVED_REFERENCE{LT}!><!UNRESOLVED_REFERENCE{PSI}!>Invert<!>(it)<!> else it }
private fun gen(argument: StackValue): BranchedValue =
object : <!INAPPLICABLE_CANDIDATE!>BranchedValue<!>(argument, null, argument.<!UNRESOLVED_REFERENCE!>type<!>, <!UNRESOLVED_REFERENCE!>Opcodes<!>.<!UNRESOLVED_REFERENCE!>IFEQ<!>) {
object : <!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>BranchedValue<!>(argument, null, argument.<!UNRESOLVED_REFERENCE!>type<!>, <!UNRESOLVED_REFERENCE!>Opcodes<!>.<!UNRESOLVED_REFERENCE!>IFEQ<!>)<!> {
override fun putSelector(type: Type, kotlinType: KotlinType?, v: InstructionAdapter) {
invokeFunction(v)
<!UNRESOLVED_REFERENCE!>coerceTo<!>(type, kotlinType, v)
<!UNRESOLVED_REFERENCE{LT}!><!UNRESOLVED_REFERENCE{PSI}!>coerceTo<!>(type, kotlinType, v)<!>
}
override fun condJump(jumpLabel: Label, v: InstructionAdapter, jumpIfFalse: Boolean) {
invokeFunction(v)
v.<!UNRESOLVED_REFERENCE!>visitJumpInsn<!>(if (jumpIfFalse) <!UNRESOLVED_REFERENCE!>Opcodes<!>.<!UNRESOLVED_REFERENCE!>IFEQ<!> else <!UNRESOLVED_REFERENCE!>Opcodes<!>.<!UNRESOLVED_REFERENCE!>IFNE<!>, jumpLabel)
v.<!UNRESOLVED_REFERENCE{LT}!><!UNRESOLVED_REFERENCE{PSI}!>visitJumpInsn<!>(if (jumpIfFalse) <!UNRESOLVED_REFERENCE!>Opcodes<!>.<!UNRESOLVED_REFERENCE!>IFEQ<!> else <!UNRESOLVED_REFERENCE!>Opcodes<!>.<!UNRESOLVED_REFERENCE!>IFNE<!>, jumpLabel)<!>
}
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{LT}!><!UNRESOLVED_REFERENCE{PSI}!>invokeFunction<!>(resolvedCall.<!UNRESOLVED_REFERENCE!>call<!>, resolvedCall, <!UNRESOLVED_REFERENCE{LT}!><!UNRESOLVED_REFERENCE{PSI}!>none<!>()<!>)<!>
result.<!UNRESOLVED_REFERENCE{LT}!><!UNRESOLVED_REFERENCE{PSI}!>put<!>(result.<!UNRESOLVED_REFERENCE!>type<!>, result.<!UNRESOLVED_REFERENCE!>kotlinType<!>, v)<!>
}
}
}
......@@ -21,7 +21,7 @@ class Bar {
}
// NB! abc() here is resolved to member Foo.abc(), and not to extension member of Bar
fun Foo.check() = abc() <!NONE_APPLICABLE!>+<!> bar()
fun Foo.check() = <!NONE_APPLICABLE{LT}!>abc() <!NONE_APPLICABLE{PSI}!>+<!> bar()<!>
// NB! + here is resolved to member String.plus (not to extension member above)
fun Foo.check2() = "" + bar()
......@@ -43,7 +43,7 @@ fun f() {
val d = ""
val c = <!UNRESOLVED_REFERENCE!>c<!>
<!UNRESOLVED_REFERENCE!>abc<!>()
<!UNRESOLVED_REFERENCE{LT}!><!UNRESOLVED_REFERENCE{PSI}!>abc<!>()<!>
fun bcd() {}
......@@ -57,7 +57,7 @@ fun f() {
dcb()
}
<!UNRESOLVED_REFERENCE!>dcb<!>()
<!UNRESOLVED_REFERENCE{LT}!><!UNRESOLVED_REFERENCE{PSI}!>dcb<!>()<!>
abc()
}
......@@ -3,4 +3,4 @@
const val x = 42
annotation class Some(val value: Int)
\ No newline at end of file
annotation class Some(val value: Int)
......@@ -16,4 +16,4 @@ fun foo() {
} catch (t: Throwable) {
0
}
}
\ No newline at end of file
}
......@@ -20,6 +20,6 @@ fun test() {
JavaClass.bar()
val errC = BB.<!UNRESOLVED_REFERENCE!>C<!>
val errBarViaBB = BB.<!UNRESOLVED_REFERENCE!>bar<!>()
val errBarViaAA = AA.<!UNRESOLVED_REFERENCE!>bar<!>()
}
\ No newline at end of file
val errBarViaBB = BB.<!UNRESOLVED_REFERENCE{LT}!><!UNRESOLVED_REFERENCE{PSI}!>bar<!>()<!>
val errBarViaAA = AA.<!UNRESOLVED_REFERENCE{LT}!><!UNRESOLVED_REFERENCE{PSI}!>bar<!>()<!>
}
......@@ -13,4 +13,4 @@ fun foo() {
val ra = bar(a)
val rb = bar(b)
val rc = bar(c)
}
\ No newline at end of file
}
......@@ -7,4 +7,4 @@ class Factory {
val f = Function
val x = Function.Default
}
}
\ No newline at end of file
}
......@@ -23,4 +23,4 @@ fun test() {
val x = A.D
val y = B.C
val z = B.<!UNRESOLVED_REFERENCE!>D<!>
}
\ No newline at end of file
}
......@@ -6,4 +6,4 @@ class My {
fun test() {
foo()
}
}
\ No newline at end of file
}
......@@ -4,4 +4,4 @@ class C {
}
fun foo() = C()
fun bar() = foo().create()
\ No newline at end of file
fun bar() = foo().create()
......@@ -7,4 +7,4 @@
lateinit var delegate: Base
fun check() = delegate.check() // Should not resolve
}
\ No newline at end of file
}
......@@ -18,5 +18,5 @@ fun test() {
useEnum(TestEnum.THIRD)
useVararg(TestEnum.FIRST, TestEnum.SECOND)
<!INAPPLICABLE_CANDIDATE!>useVararg<!>(1, 2, 3, 4, 5)
}
\ No newline at end of file
<!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>useVararg<!>(1, 2, 3, 4, 5)<!>
}
......@@ -15,4 +15,4 @@ fun foo() {
val first = MyEnum.valueOf("FIRST")
val last = MyEnum.valueOf("LAST")
}
\ No newline at end of file
}
......@@ -10,4 +10,4 @@ class My {
fun Your.foo() {
val x = <!UNRESOLVED_REFERENCE!>::Nested<!> // Still should be error
}
\ No newline at end of file
}
......@@ -11,4 +11,4 @@ fun use(f: () -> String) {}
fun test1() {
use { C("abc").y }
use(C("abc")::y)
}
\ No newline at end of file
}
......@@ -16,4 +16,4 @@ public abstract class Decorator<T extends LookupElement> extends LookupElement {
class MyDecorator : Decorator<LookupElement> {
override fun getLookupString(): String = delegate.lookupString
}
\ No newline at end of file
}
......@@ -38,4 +38,4 @@ fun <D : Descriptor> test(call: Call<D>, resolvedCall: ResolvedCall<D>) {
fun otherTest(call: Call<*>, resolvedCall: ResolvedCall<*>) {
call.resultingDescriptor.name
resolvedCall.resultingDescriptor.name
}
\ No newline at end of file
}
......@@ -4,4 +4,4 @@ abstract class Base<T>(val x: T) {
class Derived<T>(x: T) : Base<T>(x) {
override fun foo(): T = x
}
\ No newline at end of file
}
......@@ -6,4 +6,4 @@ fun test(arg: Generic<String>) {
val value = arg.value
val foo = arg.foo()
val length = foo.length + value.length
}
\ No newline at end of file
}
......@@ -28,4 +28,4 @@ fun test() {
true.gau()
wat()
false.watwat()
}
\ No newline at end of file
}
......@@ -5,4 +5,4 @@ fun main() {
val a = id("string")
val b = id(null)
val c = id(id(a))
}
\ No newline at end of file
}
......@@ -7,5 +7,5 @@ fun <T : Foo> foo(t: T) = t
fun main(fooImpl: FooImpl, bar: Bar) {
val a = foo(fooImpl)
val b = <!INAPPLICABLE_CANDIDATE!>foo<!>(bar)
}
\ No newline at end of file
val b = <!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>foo<!>(bar)<!>
}
......@@ -6,6 +6,6 @@ fun <T : Foo> foo(t: T) = t
fun main(fooImpl: FooImpl, fooBarImpl: FooBarImpl) {
val a = <!INAPPLICABLE_CANDIDATE!>foo<!><FooImpl>(fooBarImpl)
val a = <!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>foo<!><FooImpl>(fooBarImpl)<!>
val b = foo<Foo>(fooImpl)
}
\ No newline at end of file
}
......@@ -3,4 +3,4 @@ class Outer {
}
val x = Outer.Inner
val klass = Outer.Inner::class
\ No newline at end of file
val klass = Outer.Inner::class
......@@ -10,4 +10,4 @@ class Outer {
inner class Inner : Base() {
val c = codegen
}
}
\ No newline at end of file
}
fun String.k(): () -> String = { -> this }
fun test() = "hello".k()()
\ No newline at end of file
fun test() = "hello".k()()
......@@ -22,4 +22,4 @@ class Bar {
fun baz() {
x() // Should resolve to fun x()
}
}
\ No newline at end of file
}
......@@ -16,4 +16,4 @@ class Foo {
val x: Bar = Bar()
fun bar() = x() // Should resolve to invoke (1)
}
\ No newline at end of file
}
......@@ -8,4 +8,4 @@ class Foo {
val x = 0
fun foo() = x() // should resolve to invoke
}
\ No newline at end of file
}
......@@ -7,4 +7,4 @@ class Y {
val x = X
x.op()
}
}
\ No newline at end of file
}
......@@ -9,4 +9,4 @@ class Foo {
val x = 0
fun foo() = x() // should resolve to fun x
}
\ No newline at end of file
}
......@@ -7,4 +7,4 @@ class A {
fun create() = A()
val foo = create()
\ No newline at end of file
val foo = create()
fun test(e: Int.() -> String) {
val s = 3.e()
val ss = 3.(e)()
}
\ No newline at end of file
}
......@@ -7,4 +7,4 @@ fun sss() {
// Should be resolved to top-level some,
// because with local some invoke isn't applicable
some()
}
\ No newline at end of file
}
class Bar(name: () -> String) {
val name = name()
}
\ No newline at end of file
}
......@@ -7,4 +7,4 @@ fun test(a: A) {
}
val c = a.y
val d = "".c()
}
\ No newline at end of file
}
......@@ -4,4 +4,4 @@ class Simple {
fun test(s: Simple) {
val result = s()
}
\ No newline at end of file
}
......@@ -17,6 +17,6 @@ class Foo {
// this@Foo is dispatch receiver of foobar
// Foo/foobar is dispatch receiver of invoke
// this@chk is extension receiver of invoke
buz.<!UNRESOLVED_REFERENCE!>foobar<!>()
buz.<!UNRESOLVED_REFERENCE{LT}!><!UNRESOLVED_REFERENCE{PSI}!>foobar<!>()<!>
}
}
......@@ -10,4 +10,4 @@ public class JavaClass {
fun test() {
val staticReference = JavaClass::staticField
val nonStaticReference = JavaClass::nonStaticField
}
\ No newline at end of file
}
......@@ -38,4 +38,4 @@ fun test_4() {
this.inc()
it.length
}
}
\ No newline at end of file
}
......@@ -8,4 +8,4 @@ class Outer {
}
val y = ""
}
\ No newline at end of file
}
......@@ -2,4 +2,4 @@ fun test() {
class Local
val l = Local()
}
\ No newline at end of file
}
......@@ -3,4 +3,4 @@
fun Foo.bar() {}
bar()
}
}
\ No newline at end of file
}
......@@ -4,4 +4,4 @@ fun foo() {
fun abc() = 1
}
val g = x.sss()
}
\ No newline at end of file
}
......@@ -8,4 +8,4 @@ fun bar() {
inner class Derived(val x: Int) : Foo
}
}
\ No newline at end of file
}
......@@ -12,10 +12,10 @@ fun test() {
}
b.foo()
<!LOCAL_OBJECT_NOT_ALLOWED!>object B<!> {
<!LOCAL_OBJECT_NOT_ALLOWED{LT}!><!LOCAL_OBJECT_NOT_ALLOWED{PSI}!>object B<!> {
fun foo() {}
}
}<!>
B.foo()
}
val bb = <!UNRESOLVED_REFERENCE!>B<!>.<!UNRESOLVED_REFERENCE!>foo<!>()
val bb = <!UNRESOLVED_REFERENCE!>B<!>.<!UNRESOLVED_REFERENCE{LT}!><!UNRESOLVED_REFERENCE{PSI}!>foo<!>()<!>
......@@ -25,4 +25,4 @@ fun test() {
derived.gau()
derived.baz()
derived.foo()
}
\ No newline at end of file
}
......@@ -11,4 +11,4 @@ fun foo() {
val Boolean.w: Char get() = ' '
fun <T : Foo> id(arg: T): T = arg
}
}
\ No newline at end of file
}
......@@ -20,4 +20,4 @@ fun foo(): Boolean {
val some = true
return !some
}
\ No newline at end of file
}
......@@ -12,4 +12,4 @@ class Bar {
fun bar(arg: Foo) {
arg.foo()
}
}
\ No newline at end of file
}
......@@ -5,4 +5,4 @@ class A {
val x = ::Nested
val y = A::Nested
}
}
\ No newline at end of file
}
......@@ -7,4 +7,4 @@ object A {
object B
val err = B.<!UNRESOLVED_REFERENCE!>A<!>.<!UNRESOLVED_REFERENCE!>B<!>
val correct = A.B.A
\ No newline at end of file
val correct = A.B.A
......@@ -11,8 +11,8 @@ open class Outer {
class Derived : Outer() {
fun foo() {
Outer.<!HIDDEN!>PrivateNested<!>()
super.<!HIDDEN!>PrivateInner<!>()
Outer.<!HIDDEN{LT}!><!HIDDEN{PSI}!>PrivateNested<!>()<!>
super.<!HIDDEN{LT}!><!HIDDEN{PSI}!>PrivateInner<!>()<!>
Outer.ProtectedNested()
super.ProtectedInner()
......@@ -23,11 +23,11 @@ class Derived : Outer() {
}
fun foo() {
Outer.<!HIDDEN!>PrivateNested<!>()
Outer().<!HIDDEN!>PrivateInner<!>()
Outer.<!HIDDEN{LT}!><!HIDDEN{PSI}!>PrivateNested<!>()<!>
Outer().<!HIDDEN{LT}!><!HIDDEN{PSI}!>PrivateInner<!>()<!>
Outer.<!HIDDEN!>ProtectedNested<!>()
Outer().<!HIDDEN!>ProtectedInner<!>()
Outer.<!HIDDEN{LT}!><!HIDDEN{PSI}!>ProtectedNested<!>()<!>
Outer().<!HIDDEN{LT}!><!HIDDEN{PSI}!>ProtectedInner<!>()<!>
Outer.PublicNested()
Outer().PublicInner()
......
......@@ -9,4 +9,4 @@ object Derived : Base
fun test() {
// See KT-35730
foo() // Derived.foo is more correct here
}
\ No newline at end of file
}
......@@ -3,4 +3,4 @@ object A {
}
fun use() = A
fun bar() = A.foo()
\ No newline at end of file
fun bar() = A.foo()
......@@ -11,4 +11,4 @@ fun test_1() {
fun test_2() {
var f = Foo()
f += Foo()
}
\ No newline at end of file
}
......@@ -6,4 +6,4 @@ class Foo {
fun test() {
var f = Foo()
<!ASSIGN_OPERATOR_AMBIGUITY!>f += f<!>
}
\ No newline at end of file
}
......@@ -7,7 +7,7 @@ class Foo {
fun test_1() {
val f = Foo()
f <!UNRESOLVED_REFERENCE!>+<!> f
<!UNRESOLVED_REFERENCE{LT}!>f <!UNRESOLVED_REFERENCE{PSI}!>+<!> f<!>
}
fun test_2() {
......@@ -19,4 +19,4 @@ fun test_3(f: Foo) {
f += f
f += ""
f += 1
}
\ No newline at end of file
}
......@@ -42,4 +42,4 @@ class Generator(val codegen: Any) {
val cc = codegen.hashCode()
}
}
}
\ No newline at end of file
}
......@@ -16,4 +16,4 @@ fun test() {
val d = Derived()
val res1 = d.something // Should be Ok
val res2 = d.getSomething() // Should be Ok
}
\ No newline at end of file
}
......@@ -10,4 +10,4 @@ class C {
}
val w = z.foo() // ERROR!
}
\ No newline at end of file
}
......@@ -9,21 +9,21 @@ private class Private {
bar()
Nested()
fromCompanion()
NotCompanion.<!HIDDEN!>foo<!>() // hidden
NotCompanion.<!HIDDEN{LT}!><!HIDDEN{PSI}!>foo<!>()<!> // hidden
}
inner class Inner {
fun foo() {
bar()
fromCompanion()
NotCompanion.<!HIDDEN!>foo<!>() // hidden
NotCompanion.<!HIDDEN{LT}!><!HIDDEN{PSI}!>foo<!>()<!> // hidden
}
}
private class Nested {
fun foo() {
fromCompanion()
NotCompanion.<!HIDDEN!>foo<!>() // hidden
NotCompanion.<!HIDDEN{LT}!><!HIDDEN{PSI}!>foo<!>()<!> // hidden
}
}
......@@ -54,7 +54,7 @@ fun withLocals() {
Local().baz()
Local().<!HIDDEN!>bar<!>() // hidden
Local().<!HIDDEN{LT}!><!HIDDEN{PSI}!>bar<!>()<!> // hidden
}
fun test() {
......@@ -62,14 +62,14 @@ fun test() {
Private().baz()
Private().Inner()
Private().<!HIDDEN!>bar<!>() // hidden
Private.<!HIDDEN!>Nested<!>() // hidden
Private.<!HIDDEN!>fromCompanion<!>() // hidden
Private().<!HIDDEN{LT}!><!HIDDEN{PSI}!>bar<!>()<!> // hidden
Private.<!HIDDEN{LT}!><!HIDDEN{PSI}!>Nested<!>()<!> // hidden
Private.<!HIDDEN{LT}!><!HIDDEN{PSI}!>fromCompanion<!>()<!> // hidden
}
// FILE: second.kt
fun secondTest() {
<!HIDDEN!>foo<!>() // hidden
<!HIDDEN!>Private<!>() // hidden
<!HIDDEN{LT}!><!HIDDEN{PSI}!>foo<!>()<!> // hidden
<!HIDDEN{LT}!><!HIDDEN{PSI}!>Private<!>()<!> // hidden
}
......@@ -31,7 +31,7 @@ class Derived : Protected() {
fun foo() {
bar()
Nested().foo()
Nested().<!HIDDEN!>bar<!>() // hidden
Nested().<!HIDDEN{LT}!><!HIDDEN{PSI}!>bar<!>()<!> // hidden
fromCompanion()
protectedFromCompanion()
......@@ -48,8 +48,8 @@ fun test() {
Protected().baz()
Protected().Inner()
Protected().<!HIDDEN!>bar<!>() // hidden
Protected.<!HIDDEN!>Nested<!>() // hidden
Protected().<!HIDDEN{LT}!><!HIDDEN{PSI}!>bar<!>()<!> // hidden
Protected.<!HIDDEN{LT}!><!HIDDEN{PSI}!>Nested<!>()<!> // hidden
}
open class Generic<T>(val x: T) {
......
......@@ -30,4 +30,4 @@ fun main() {
C().foo()
val e = a.b.E.entry
val e1 = E.entry
}
\ No newline at end of file
}
......@@ -6,7 +6,7 @@ class C {
class Nested {
fun test() {
<!UNRESOLVED_REFERENCE!>err<!>()
<!UNRESOLVED_REFERENCE{LT}!><!UNRESOLVED_REFERENCE{PSI}!>err<!>()<!>
}
}
}
......@@ -17,5 +17,5 @@ fun test() {
c.bar()
val err = C()
err.<!UNRESOLVED_REFERENCE!>foo<!>()
}
\ No newline at end of file
err.<!UNRESOLVED_REFERENCE{LT}!><!UNRESOLVED_REFERENCE{PSI}!>foo<!>()<!>
}
......@@ -4,4 +4,4 @@ class Foo {
fun test() {
bar()
}
}
\ No newline at end of file
}
......@@ -6,4 +6,4 @@ val bar = ""
val n = null
val g: String? = null
\ No newline at end of file
val g: String? = null
......@@ -12,4 +12,4 @@ class User : Owner() {
fun foo() = text
override fun getText() = ""
}
\ No newline at end of file
}
......@@ -6,4 +6,4 @@ class Foo {
fun Bar.buz() = this
fun Bar.foo() = this@Foo
fun Bar.foobar() = this@foobar
}
\ No newline at end of file
}
......@@ -7,4 +7,4 @@ class Outer {
inner class Inner {
val x = foo() // Should be Int
}
}
\ No newline at end of file
}
......@@ -5,4 +5,4 @@ fun foo() {}
fun main() {
foo()
foo("!")
}
\ No newline at end of file
}
......@@ -3,4 +3,4 @@ fun foo() = if (true) 1 else 0
fun bar(arg: Any?) = when (arg) {
is Int -> arg as Int
else -> 42
}
\ No newline at end of file
}
......@@ -10,4 +10,4 @@ class My {
}
}
fun My.foo() {}
\ No newline at end of file
fun My.foo() {}
......@@ -4,4 +4,4 @@ class My : <!OTHER_ERROR!>My<!>()
class Your : His()
class His : <!OTHER_ERROR!>Your<!>()
\ No newline at end of file
class His : <!OTHER_ERROR!>Your<!>()
......@@ -2,4 +2,4 @@ import incorrect.directory.Your
typealias My = <!UNRESOLVED_REFERENCE!>incorrect.directory.My<!>
typealias Your = <!OTHER_ERROR!>Your<!>
\ No newline at end of file
typealias Your = <!OTHER_ERROR!>Your<!>
......@@ -8,4 +8,4 @@ fun fibIterative(n: Int): Int {
prev = temp
}
return current
}
\ No newline at end of file
}
......@@ -8,4 +8,4 @@ class C<T, out S> {
interface Test {
val x: a.b.C<out CharSequence, *>.D<in List<*>, *>
}
\ No newline at end of file
}
......@@ -9,17 +9,17 @@ enum class Order {
enum class Planet(val m: Double, internal val r: Double) {
MERCURY(1.0, 2.0) {
override fun sayHello() {
<!UNRESOLVED_REFERENCE!>println<!>("Hello!!!")
<!UNRESOLVED_REFERENCE{LT}!><!UNRESOLVED_REFERENCE{PSI}!>println<!>("Hello!!!")<!>
}
},
VENERA(3.0, 4.0) {
override fun sayHello() {
<!UNRESOLVED_REFERENCE!>println<!>("Ola!!!")
<!UNRESOLVED_REFERENCE{LT}!><!UNRESOLVED_REFERENCE{PSI}!>println<!>("Ola!!!")<!>
}
},
EARTH(5.0, 6.0) {
override fun sayHello() {
<!UNRESOLVED_REFERENCE!>println<!>("Privet!!!")
<!UNRESOLVED_REFERENCE{LT}!><!UNRESOLVED_REFERENCE{PSI}!>println<!>("Privet!!!")<!>
}
};
......@@ -30,4 +30,4 @@ enum class Planet(val m: Double, internal val r: Double) {
companion object {
const val G = 6.67e-11
}
}
\ No newline at end of file
}
......@@ -6,4 +6,4 @@ class NoPrimary {
}
constructor(): this("")
}
\ No newline at end of file
}
......@@ -18,4 +18,4 @@ class SomeClass : SomeInterface {
<!INAPPLICABLE_LATEINIT_MODIFIER!>lateinit var fau: Double<!>
}
inline class InlineClass
\ No newline at end of file
inline class InlineClass
......@@ -4,4 +4,4 @@ inline fun <reified T : Any> Any.safeAs(): T? = this as? T
abstract class Summator {
abstract fun <T> plus(first: T, second: T): T
}
\ No newline at end of file
}
......@@ -12,4 +12,4 @@ class C : B() {
fun foo(x: Inv<String>) {
x.phasedFir
}
}
\ No newline at end of file
}
......@@ -15,7 +15,7 @@ class C : A, B() {
override fun foo() {
super.foo()
super.<!UNRESOLVED_REFERENCE!>bar<!>() // should be ambiguity (NB: really we should have overridden bar in C)
super.<!UNRESOLVED_REFERENCE{LT}!><!UNRESOLVED_REFERENCE{PSI}!>bar<!>()<!> // should be ambiguity (NB: really we should have overridden bar in C)
super.baz() // Ok
baz() // Ok
......
......@@ -6,4 +6,4 @@ inline fun <T> T.myLet(block: (T) -> Unit) {}
fun test(a: A, s: String) {
s.myLet(a::foo)
}
\ No newline at end of file
}
......@@ -16,4 +16,4 @@ fun main(x: A?) {
// lambda has a type (() -> Unit?)
foo(lambda)
}
\ No newline at end of file
}
......@@ -11,4 +11,4 @@ class K<T : Comparable<T>>(t: T)
fun main() {
K(0)
JavaClass(0)
}
\ No newline at end of file
}
......@@ -16,4 +16,4 @@ fun test_2(a: A, vararg zs: A.() -> Unit) {
for (z in zs) {
a.z()
}
}
\ No newline at end of file
}
......@@ -4,10 +4,10 @@ fun takeInt(x: Int) {}
fun test_1(b: Boolean) {
val x = if (b) 1 else null
<!INAPPLICABLE_CANDIDATE!>takeInt<!>(x)
<!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>takeInt<!>(x)<!>
}
fun test_2(b: Boolean, y: Int) {
val x = if (b) y else null
<!INAPPLICABLE_CANDIDATE!>takeInt<!>(x)
}
\ No newline at end of file
<!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>takeInt<!>(x)<!>
}
......@@ -24,7 +24,7 @@ fun test_1_3(resolvedCall: ResolvedCall<CallableDescriptor>) {
}
fun test_2_1(resolvedCall: ResolvedCall<out CallableDescriptor>, d: CallableDescriptor) {
val x = resolvedCall.<!INAPPLICABLE_CANDIDATE!>updateD<!>(d) // should fail
val x = resolvedCall.<!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>updateD<!>(d)<!> // should fail
}
fun test_2_2(resolvedCall: ResolvedCall<in CallableDescriptor>, d: CallableDescriptor) {
......
......@@ -23,7 +23,7 @@ class Owner {
o.foo()
foo()
this@Owner.foo()
this.<!UNRESOLVED_REFERENCE!>err<!>()
this.<!UNRESOLVED_REFERENCE{LT}!><!UNRESOLVED_REFERENCE{PSI}!>err<!>()<!>
}
}
}
......@@ -31,8 +31,8 @@ class Owner {
fun test() {
val o = Owner()
o.foo()
val err = Owner.<!UNRESOLVED_REFERENCE!>Inner<!>()
err.<!UNRESOLVED_REFERENCE!>baz<!>()
val err = Owner.<!UNRESOLVED_REFERENCE{LT}!><!UNRESOLVED_REFERENCE{PSI}!>Inner<!>()<!>
err.<!UNRESOLVED_REFERENCE{LT}!><!UNRESOLVED_REFERENCE{PSI}!>baz<!>()<!>
val i = o.Inner()
i.gau()
}
\ No newline at end of file
}
......@@ -12,10 +12,10 @@ val rr = Outer<String>().Inner<Int>()
val rrq = Boxed<String>().substitute()
fun check() {
<!INAPPLICABLE_CANDIDATE!>accept<!>(Outer<Int>().Inner<Int>()) // illegal
<!INAPPLICABLE_CANDIDATE!>accept<!>(Outer<String>().Inner<String>()) // illegal
<!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>accept<!>(Outer<Int>().Inner<Int>())<!> // illegal
<!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>accept<!>(Outer<String>().Inner<String>())<!> // illegal
accept(Outer<String>().Inner<Int>()) // ok
<!INAPPLICABLE_CANDIDATE!>accept<!>(Boxed<Int>().substitute()) // illegal
<!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>accept<!>(Boxed<Int>().substitute())<!> // illegal
accept(Boxed<String>().substitute()) // ok
}
\ No newline at end of file
}
......@@ -22,8 +22,8 @@ class Owner {
}
fun err() {
<!UNRESOLVED_REFERENCE!>foo<!>()
this.<!UNRESOLVED_REFERENCE!>foo<!>()
<!UNRESOLVED_REFERENCE{LT}!><!UNRESOLVED_REFERENCE{PSI}!>foo<!>()<!>
this.<!UNRESOLVED_REFERENCE{LT}!><!UNRESOLVED_REFERENCE{PSI}!>foo<!>()<!>
}
}
}
......@@ -33,4 +33,4 @@ fun test() {
o.foo()
val n = Owner.Nested()
n.baz()
}
\ No newline at end of file
}
......@@ -11,4 +11,4 @@ fun test() = select(Clazz1(), Clazz2())
fun <T> makeNull(x: T): T? = null
fun testNull() = makeNull(select(Clazz1(), Clazz2()))
\ No newline at end of file
fun testNull() = makeNull(select(Clazz1(), Clazz2()))
......@@ -14,4 +14,4 @@ class C {
fun anotherTest(block: C.() -> Int) {
block()
}
}
\ No newline at end of file
}
......@@ -13,4 +13,4 @@ public class A {
fun test(a: A) {
val int = a.x // <- should be int
val string = a.getX()
}
\ No newline at end of file
}
......@@ -26,6 +26,6 @@ open class B<V> : A<Any, V>() {
fun test_1(b: B<Int>, x: Int, inv: Inv<Int>) {
b.take(x)
b.<!INAPPLICABLE_CANDIDATE!>take<!>(null)
b.<!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>take<!>(null)<!>
b.takeInv(inv)
}
......@@ -21,7 +21,7 @@ fun case1(kotlinClass: KotlinClass?) {
{it}
}
lambda.checkType { <!INAPPLICABLE_CANDIDATE!>_<!><Function1<Unit, KotlinClass?>>() }
lambda.checkType { <!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>_<!><Function1<Unit, KotlinClass?>>()<!> }
}
// TESTCASE NUMBER: 2
fun case2(kotlinClass: KotlinClass) {
......@@ -36,5 +36,5 @@ fun case2(kotlinClass: KotlinClass) {
{it}
}
lambda.checkType { <!INAPPLICABLE_CANDIDATE!>_<!><Function1<Unit, KotlinClass?>>() }
}
\ No newline at end of file
lambda.checkType { <!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>_<!><Function1<Unit, KotlinClass?>>()<!> }
}
......@@ -14,4 +14,4 @@ fun test_2(s: String) {
class B<out K, V>(val k: K, val v: V)
fun <X, R, V> B<X, V>.myMap(transform: (B<X, V>) -> R): B<R, V> = TODO()
\ No newline at end of file
fun <X, R, V> B<X, V>.myMap(transform: (B<X, V>) -> R): B<R, V> = TODO()
......@@ -26,9 +26,9 @@ fun case1(javaClass: JavaClass?) {
validType.checkType { _<Function1<JavaClass, Boolean>>() } //ok
invalidType.checkType { <!INAPPLICABLE_CANDIDATE!>_<!><Function1<Nothing, Boolean>>() } //(!!!)
invalidType.checkType { <!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>_<!><Function1<Nothing, Boolean>>()<!> } //(!!!)
Case1(javaClass).x.checkType { <!INAPPLICABLE_CANDIDATE!>_<!><Function1<Nothing, Boolean>>() } //(!!!)
Case1(javaClass).x.checkType { <!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>_<!><Function1<Nothing, Boolean>>()<!> } //(!!!)
}
class Case1(val javaClass: JavaClass?) {
......@@ -55,9 +55,9 @@ fun case2(kotlinClass: KotlinClass?) {
validType.checkType { _<Function1<KotlinClass, Boolean>>() } //ok
invalidType.checkType { <!INAPPLICABLE_CANDIDATE!>_<!><Function1<Nothing, Boolean>>() } //(!!!)
invalidType.checkType { <!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>_<!><Function1<Nothing, Boolean>>()<!> } //(!!!)
Case2(kotlinClass).x.checkType { <!INAPPLICABLE_CANDIDATE!>_<!><Function1<Nothing, Boolean>>() } //(!!!)
Case2(kotlinClass).x.checkType { <!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>_<!><Function1<Nothing, Boolean>>()<!> } //(!!!)
}
class Case2(val kotlinClass: KotlinClass?) {
......
......@@ -20,4 +20,4 @@ fun test_2() {
val y = 1
y.transform()
}
\ No newline at end of file
}
......@@ -44,4 +44,4 @@ class TestProperty {
}
2
}
}
\ No newline at end of file
}
......@@ -43,4 +43,4 @@ class Second(val y: Char) : @WithInt(0) First() {
@WithInt(24)
@VeryComplex(3.14f, 6.67e-11, false, 123456789012345L, null)
typealias Third = @Simple Second
\ No newline at end of file
typealias Third = @Simple Second
......@@ -15,4 +15,4 @@ import test.*
interface My {
// Should be kotlin.ByteArray
val array: ByteArray
}
\ No newline at end of file
}
......@@ -25,4 +25,4 @@ import b.B
class A : B() {
class NestedInA1 : NestedInB()
class NestedInA2 : NestedInC()
}
\ No newline at end of file
}
......@@ -20,4 +20,4 @@ abstract class Factory {
abstract fun createObj(): O
abstract fun createExtra(): Extra
}
\ No newline at end of file
}
......@@ -12,4 +12,4 @@ package b
import a.MyClass.MyNested
class YourClass : MyNested()
\ No newline at end of file
class YourClass : MyNested()
......@@ -12,4 +12,4 @@ package b
import a.Outer
class My : Outer.Nested()
\ No newline at end of file
class My : Outer.Nested()
......@@ -17,7 +17,7 @@ class D : A.C() {
val a = A()
val ac = A.C()
val c = <!UNRESOLVED_REFERENCE!>C<!>() // shouldn't resolve
val c = <!UNRESOLVED_REFERENCE{LT}!><!UNRESOLVED_REFERENCE{PSI}!>C<!>()<!> // shouldn't resolve
}
}
......
......@@ -38,4 +38,4 @@ class Foo {
private fun saveResult(result: Result) {}
class Result
}
\ No newline at end of file
}
......@@ -4,4 +4,4 @@ class Some {
fun foo(): Nested {
return Nested()
}
}
\ No newline at end of file
}
......@@ -146,4 +146,4 @@ class Case3() {
}
interface A {}
class B() {}
\ No newline at end of file
class B() {}
......@@ -44,4 +44,4 @@ fun callJava(derived: Test.Derived, derivedRaw: Test.DerivedRaw, v: Test.I123) {
fun callKotlin(derived: KDerived) {
derived.foo<KI12>()
}
\ No newline at end of file
}
......@@ -12,4 +12,4 @@ interface Some {
set(value) {
field = value
}
}
\ No newline at end of file
}
......@@ -12,4 +12,4 @@ class C : Base(), I
fun f(list: List<Int>) {
C().f(list)
}
\ No newline at end of file
}
......@@ -14,7 +14,7 @@ class B : A() {
fun test() {
foo()
bar()
<!NONE_APPLICABLE!>buz<!>()
<!NONE_APPLICABLE{LT}!><!NONE_APPLICABLE{PSI}!>buz<!>()<!>
}
}
......@@ -10,5 +10,5 @@ class C : Base<CharSequence>()
fun f(list: MutableList<X>, s: MutableList<CharSequence>) {
C().f(list, s)
C().<!INAPPLICABLE_CANDIDATE!>f<!>(s, list)
C().<!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>f<!>(s, list)<!>
}
......@@ -19,4 +19,4 @@ class C : B() {
bar()
baz()
}
}
\ No newline at end of file
}
......@@ -3,4 +3,4 @@ fun <K> select(x: K, y: K): K = TODO()
fun test() {
select(id { it.inv() }, id<(Int) -> Unit> { })
}
\ No newline at end of file
}
......@@ -11,5 +11,5 @@ public interface SLRUMap<V> {
// FILE: main.kt
fun <V> SLRUMap<V>.getOrPut(value: V) {
<!INAPPLICABLE_CANDIDATE!>takeV<!>(value)
<!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>takeV<!>(value)<!>
}
......@@ -20,7 +20,7 @@ class WrappedPropertyDescriptor : PropertyDescriptor {
fun test() {
val descriptor = WrappedPropertyDescriptor()
val res1 = descriptor.setter
val res2 = descriptor.<!UNRESOLVED_REFERENCE!>getSetter<!>() // Should be error
val res2 = descriptor.<!UNRESOLVED_REFERENCE{LT}!><!UNRESOLVED_REFERENCE{PSI}!>getSetter<!>()<!> // Should be error
val res3 = descriptor.isDelegated
val res4 = descriptor.<!UNRESOLVED_REFERENCE!>isDelegated<!>() // Should be error
}
\ No newline at end of file
val res4 = descriptor.<!UNRESOLVED_REFERENCE{LT}!><!UNRESOLVED_REFERENCE{PSI}!>isDelegated<!>()<!> // Should be error
}
......@@ -22,4 +22,4 @@ open class A(val s: String) {
inner class F : E()
}
fun box(): String = A("Fail").F().s
\ No newline at end of file
fun box(): String = A("Fail").F().s
......@@ -10,5 +10,5 @@ class Another {}
fun test() {
val some = Some()
val another = <!UNRESOLVED_REFERENCE!>Another<!>()
}
\ No newline at end of file
val another = <!UNRESOLVED_REFERENCE{LT}!><!UNRESOLVED_REFERENCE{PSI}!>Another<!>()<!>
}
class Outer { inner class Inner }
fun test() {
val x = object : <!UNRESOLVED_REFERENCE!>Outer.Inner<!>() { }
}
\ No newline at end of file
val x = object : <!UNRESOLVED_REFERENCE{LT}!><!UNRESOLVED_REFERENCE{PSI}!>Outer.Inner<!>()<!> { }
}
......@@ -10,4 +10,4 @@ class B(p0: String) {
p1 = p0.length
p3 = ""
}
}
\ No newline at end of file
}
......@@ -27,4 +27,4 @@ val KonanTarget.presetName
// Exhaustive when expressions give Any result type
// Substitution for field declared in Java super-type does not work (KotlinStringLiteralTextEscaper.myHost)
// Super is not resolved in anonymous object
// TypeParameterDescriptor.name is not resolved
\ No newline at end of file
// TypeParameterDescriptor.name is not resolved
......@@ -10,5 +10,5 @@ public @interface Ann {
fun test(ann: Ann) {
ann.value
ann.<!UNRESOLVED_REFERENCE!>value<!>() // should be an error
ann.<!UNRESOLVED_REFERENCE{LT}!><!UNRESOLVED_REFERENCE{PSI}!>value<!>()<!> // should be an error
}
......@@ -19,4 +19,4 @@ public class B {
fun test(b: B) {
b.text += ""
}
\ No newline at end of file
}
......@@ -16,4 +16,4 @@ fun test() {
fun A.invoke() {}
my.xx()
}
\ No newline at end of file
}
......@@ -6,4 +6,4 @@ fun testRef(f: () -> Int) {}
fun test() {
// should resolve to Int.foo
testRef(1::foo)
}
\ No newline at end of file
}
fun foo() = 1
fun bar() = foo()
\ No newline at end of file
fun bar() = foo()
......@@ -6,4 +6,4 @@ class B : A() {
fun bar() {
foo()
}
}
\ No newline at end of file
}
......@@ -18,9 +18,9 @@ fun main() {
x.toInt().toString()
})
<!INAPPLICABLE_CANDIDATE!>foo2<!>(MyFunction { x: Int ->
<!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>foo2<!>(MyFunction { x: Int ->
x.toString()
})
})<!>
foo3(
MyFunction { x ->
......
......@@ -10,13 +10,13 @@ fun foo(m: MyRunnable) {}
fun MyRunnable(x: (Int) -> Boolean) = 1
fun main() {
<!INAPPLICABLE_CANDIDATE!>foo<!>(MyRunnable { x ->
<!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>foo<!>(MyRunnable { x ->
x > 1
})
})<!>
<!INAPPLICABLE_CANDIDATE!>foo<!>(MyRunnable({ it > 1 }))
<!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>foo<!>(MyRunnable({ it > 1 }))<!>
val x = { x: Int -> x > 1 }
<!INAPPLICABLE_CANDIDATE!>foo<!>(MyRunnable(x))
<!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>foo<!>(MyRunnable(x))<!>
}
......@@ -21,9 +21,9 @@ fun main() {
x.toInt().toString()
}
JavaUsage.<!INAPPLICABLE_CANDIDATE!>foo2<!> { x: Int ->
JavaUsage.<!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>foo2<!> { x: Int ->
x.toString()
}
}<!>
JavaUsage.foo3(
{ x ->
......
......@@ -29,11 +29,11 @@ fun main() {
foo1 { x -> x > 1 }
foo1(f)
<!INAPPLICABLE_CANDIDATE!>foo2<!> { x -> x <!UNRESOLVED_REFERENCE!>><!> 1 }
<!INAPPLICABLE_CANDIDATE!>foo2<!>(f)
<!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>foo2<!> { x -> x <!UNRESOLVED_REFERENCE!>><!> 1 }<!>
<!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>foo2<!>(f)<!>
<!INAPPLICABLE_CANDIDATE!>foo3<!> { x -> x <!UNRESOLVED_REFERENCE!>><!> 1 }
<!INAPPLICABLE_CANDIDATE!>foo3<!>(f)
<!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>foo3<!> { x -> x <!UNRESOLVED_REFERENCE!>><!> 1 }<!>
<!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>foo3<!>(f)<!>
foo4 { x -> x > 1 }
foo4(f)
......
......@@ -18,14 +18,14 @@ public class JavaUsage {
fun foo(m: MyRunnable) {}
fun main() {
JavaUsage.<!INAPPLICABLE_CANDIDATE!>foo<!> {
JavaUsage.<!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>foo<!> {
x ->
x <!UNRESOLVED_REFERENCE!>><!> 1
}
}<!>
JavaUsage.<!INAPPLICABLE_CANDIDATE!>foo<!>({ <!UNRESOLVED_REFERENCE!>it<!> <!UNRESOLVED_REFERENCE!>><!> 1 })
JavaUsage.<!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>foo<!>({ <!UNRESOLVED_REFERENCE!>it<!> <!UNRESOLVED_REFERENCE!>><!> 1 })<!>
val x = { x: Int -> x > 1 }
JavaUsage.<!INAPPLICABLE_CANDIDATE!>foo<!>(x)
JavaUsage.<!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>foo<!>(x)<!>
}
......@@ -6,5 +6,5 @@ sealed class WithPrivateConstructor private constructor(val x: Int) {
private constructor() : this(42)
}
object First : <!NONE_APPLICABLE!>WithPrivateConstructor<!>() // error
object Second : <!NONE_APPLICABLE!>WithPrivateConstructor<!>(0) // error
object First : <!NONE_APPLICABLE{LT}!><!NONE_APPLICABLE{PSI}!>WithPrivateConstructor<!>()<!> // error
object Second : <!NONE_APPLICABLE{LT}!><!NONE_APPLICABLE{PSI}!>WithPrivateConstructor<!>(0)<!> // error
......@@ -16,4 +16,4 @@ class SomeClass : SomeInterface {
set(value) {}
var fau: Double
}
\ No newline at end of file
}
......@@ -2,4 +2,4 @@ interface B
typealias C = B
class D : C
\ No newline at end of file
class D : C
......@@ -26,7 +26,7 @@ fun test_3(a: A?, b: Boolean) {
if (b && a!!.foo()) {
a.foo() // OK
}
a.<!INAPPLICABLE_CANDIDATE!>foo<!>() // Bad
a.<!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>foo<!>()<!> // Bad
}
fun test_4(a: A?, b: Boolean) {
......@@ -38,9 +38,9 @@ fun test_4(a: A?, b: Boolean) {
fun test_5(a: A?, b: Boolean) {
if (b || a!!.foo()) {
a.<!INAPPLICABLE_CANDIDATE!>foo<!>()
a.<!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>foo<!>()<!>
}
a.<!INAPPLICABLE_CANDIDATE!>foo<!>()
a.<!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>foo<!>()<!>
}
fun <X : A?> test_6(x: X) {
......@@ -49,4 +49,4 @@ fun <X : A?> test_6(x: X) {
fun <X : A> test_7(x: X?) {
x!!.foo()
}
\ No newline at end of file
}
......@@ -24,8 +24,8 @@ fun test_1(x: Any) {
fun test_2(x: Any) {
if (x is B || x is C) {
x.foo()
x.<!UNRESOLVED_REFERENCE!>bar<!>()
x.<!UNRESOLVED_REFERENCE!>baz<!>()
x.<!UNRESOLVED_REFERENCE{LT}!><!UNRESOLVED_REFERENCE{PSI}!>bar<!>()<!>
x.<!UNRESOLVED_REFERENCE{LT}!><!UNRESOLVED_REFERENCE{PSI}!>baz<!>()<!>
}
}
......@@ -59,26 +59,26 @@ fun test_6(x: Any) {
fun test_7(x: Any) {
if (x is A || false) {
// TODO: should be smartcast
x.<!UNRESOLVED_REFERENCE!>foo<!>()
x.<!UNRESOLVED_REFERENCE{LT}!><!UNRESOLVED_REFERENCE{PSI}!>foo<!>()<!>
}
}
fun test_8(x: Any) {
if (false || x is A) {
// TODO: should be smartcast
x.<!UNRESOLVED_REFERENCE!>foo<!>()
x.<!UNRESOLVED_REFERENCE{LT}!><!UNRESOLVED_REFERENCE{PSI}!>foo<!>()<!>
}
}
fun test_9(x: Any) {
if (x is A || true) {
x.<!UNRESOLVED_REFERENCE!>foo<!>()
x.<!UNRESOLVED_REFERENCE{LT}!><!UNRESOLVED_REFERENCE{PSI}!>foo<!>()<!>
}
}
fun test_10(x: Any) {
if (true || x is A) {
x.<!UNRESOLVED_REFERENCE!>foo<!>()
x.<!UNRESOLVED_REFERENCE{LT}!><!UNRESOLVED_REFERENCE{PSI}!>foo<!>()<!>
}
}
......@@ -86,7 +86,7 @@ fun test_10(x: Any) {
fun test_11(x: Any, b: Boolean) {
if (false && x is A) {
x.<!UNRESOLVED_REFERENCE!>foo<!>()
x.<!UNRESOLVED_REFERENCE{LT}!><!UNRESOLVED_REFERENCE{PSI}!>foo<!>()<!>
}
}
......
......@@ -8,13 +8,13 @@ fun test_1(b: Boolean?) {
if ((b == true) == true) {
b.not() // OK
} else {
b.<!INAPPLICABLE_CANDIDATE!>not<!>() // Bad
b.<!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>not<!>()<!> // Bad
}
}
fun test_2(b: Boolean?) {
if ((b == true) != true) {
b.<!INAPPLICABLE_CANDIDATE!>not<!>() // Bad
b.<!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>not<!>()<!> // Bad
} else {
b.not() // OK
}
......@@ -22,7 +22,7 @@ fun test_2(b: Boolean?) {
fun test_3(b: Boolean?) {
if ((b == true) == false) {
b.<!INAPPLICABLE_CANDIDATE!>not<!>() // Bad
b.<!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>not<!>()<!> // Bad
} else {
b.not() // OK
}
......@@ -32,13 +32,13 @@ fun test_4(b: Boolean?) {
if ((b == true) != false) {
b.not() // OK
} else {
b.<!INAPPLICABLE_CANDIDATE!>not<!>() // Bad
b.<!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>not<!>()<!> // Bad
}
}
fun test_5(b: Boolean?) {
if ((b != true) == true) {
b.<!INAPPLICABLE_CANDIDATE!>not<!>() // Bad
b.<!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>not<!>()<!> // Bad
} else {
b.not() // OK
}
......@@ -48,7 +48,7 @@ fun test_6(b: Boolean?) {
if ((b != true) != true) {
b.not() // OK
} else {
b.<!INAPPLICABLE_CANDIDATE!>not<!>() // Bad
b.<!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>not<!>()<!> // Bad
}
}
......@@ -56,14 +56,14 @@ fun test_7(b: Boolean?) {
if ((b != true) == false) {
b.not() // OK
} else {
b.<!INAPPLICABLE_CANDIDATE!>not<!>() // Bad
b.<!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>not<!>()<!> // Bad
}
}
fun test_8(b: Boolean?) {
if ((b != true) != false) {
b.<!INAPPLICABLE_CANDIDATE!>not<!>() // Bad
b.<!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>not<!>()<!> // Bad
} else {
b.not() // OK
}
}
\ No newline at end of file
}
......@@ -34,24 +34,24 @@ fun test_4(a: A?) {
fun test_5(a: A?) {
a == null || throw Exception()
a.<!INAPPLICABLE_CANDIDATE!>foo<!>()
a.<!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>foo<!>()<!>
}
fun teat_6(a: A?) {
a != null && throw Exception()
a.<!INAPPLICABLE_CANDIDATE!>foo<!>()
a.<!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>foo<!>()<!>
}
fun test_7(a: A?) {
if (a == null || throw Exception()) {
a.<!INAPPLICABLE_CANDIDATE!>foo<!>()
a.<!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>foo<!>()<!>
}
a.<!INAPPLICABLE_CANDIDATE!>foo<!>()
a.<!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>foo<!>()<!>
}
fun test_8(a: A?) {
if (a != null && throw Exception()) {
a.<!INAPPLICABLE_CANDIDATE!>foo<!>()
a.<!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>foo<!>()<!>
}
a.<!INAPPLICABLE_CANDIDATE!>foo<!>()
a.<!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>foo<!>()<!>
}
......@@ -30,7 +30,7 @@ fun test_3(x: Any, y: Any) {
}
z = y
if (y is B) {
z.<!UNRESOLVED_REFERENCE!>foo<!>()
z.<!UNRESOLVED_REFERENCE{LT}!><!UNRESOLVED_REFERENCE{PSI}!>foo<!>()<!>
z.bar()
}
}
......@@ -40,7 +40,7 @@ fun test_4(y: Any) {
x as Int
x.inc()
x = y
x.<!UNRESOLVED_REFERENCE!>inc<!>()
x.<!UNRESOLVED_REFERENCE{LT}!><!UNRESOLVED_REFERENCE{PSI}!>inc<!>()<!>
if (y is A) {
x.foo()
y.foo()
......@@ -75,4 +75,4 @@ fun test_7(d1: D, d2: D) {
a.foo() // should be OK
b as B
b.bar() // should be OK
}
\ No newline at end of file
}
......@@ -118,4 +118,4 @@ fun test_7() {
y.<!INAPPLICABLE_CANDIDATE!>length<!> // Bad
z.length // OK
}
}
\ No newline at end of file
}
......@@ -15,31 +15,31 @@ fun test_3(b: Boolean, x: Any?) {
if (b && x as Boolean) {
x.not()
}
x.<!UNRESOLVED_REFERENCE!>not<!>()
x.<!UNRESOLVED_REFERENCE{LT}!><!UNRESOLVED_REFERENCE{PSI}!>not<!>()<!>
if (b && x as Boolean == true) {
x.not()
}
x.<!UNRESOLVED_REFERENCE!>not<!>()
x.<!UNRESOLVED_REFERENCE{LT}!><!UNRESOLVED_REFERENCE{PSI}!>not<!>()<!>
if (b || x as Boolean) {
x.<!UNRESOLVED_REFERENCE!>not<!>()
x.<!UNRESOLVED_REFERENCE{LT}!><!UNRESOLVED_REFERENCE{PSI}!>not<!>()<!>
}
x.<!UNRESOLVED_REFERENCE!>not<!>()
x.<!UNRESOLVED_REFERENCE{LT}!><!UNRESOLVED_REFERENCE{PSI}!>not<!>()<!>
}
fun test_4(b: Any) {
if (b as? Boolean != null) {
b.not()
} else {
b.<!UNRESOLVED_REFERENCE!>not<!>()
b.<!UNRESOLVED_REFERENCE{LT}!><!UNRESOLVED_REFERENCE{PSI}!>not<!>()<!>
}
b.<!UNRESOLVED_REFERENCE!>not<!>()
b.<!UNRESOLVED_REFERENCE{LT}!><!UNRESOLVED_REFERENCE{PSI}!>not<!>()<!>
if (b as? Boolean == null) {
b.<!UNRESOLVED_REFERENCE!>not<!>()
b.<!UNRESOLVED_REFERENCE{LT}!><!UNRESOLVED_REFERENCE{PSI}!>not<!>()<!>
} else {
b.not()
}
b.<!UNRESOLVED_REFERENCE!>not<!>()
}
\ No newline at end of file
b.<!UNRESOLVED_REFERENCE{LT}!><!UNRESOLVED_REFERENCE{PSI}!>not<!>()<!>
}
......@@ -14,4 +14,4 @@ fun test2(a: Any?, b: Any?): String {
if (b !is String) return ""
if (a !is String?) return ""
return a ?: b
}
\ No newline at end of file
}
......@@ -36,8 +36,8 @@ fun test_2(x: Any) {
else -> return
}
x.foo()
x.<!UNRESOLVED_REFERENCE!>bar<!>()
x.<!UNRESOLVED_REFERENCE!>baz<!>()
x.<!UNRESOLVED_REFERENCE{LT}!><!UNRESOLVED_REFERENCE{PSI}!>bar<!>()<!>
x.<!UNRESOLVED_REFERENCE{LT}!><!UNRESOLVED_REFERENCE{PSI}!>baz<!>()<!>
}
fun test_3(x: Any) {
......@@ -45,9 +45,9 @@ fun test_3(x: Any) {
x is B -> x.bar()
x is C -> x.baz()
}
x.<!UNRESOLVED_REFERENCE!>foo<!>()
x.<!UNRESOLVED_REFERENCE!>bar<!>()
x.<!UNRESOLVED_REFERENCE!>baz<!>()
x.<!UNRESOLVED_REFERENCE{LT}!><!UNRESOLVED_REFERENCE{PSI}!>foo<!>()<!>
x.<!UNRESOLVED_REFERENCE{LT}!><!UNRESOLVED_REFERENCE{PSI}!>bar<!>()<!>
x.<!UNRESOLVED_REFERENCE{LT}!><!UNRESOLVED_REFERENCE{PSI}!>baz<!>()<!>
}
fun <T> runHigherOrder(f: () -> T): T = f()
......@@ -60,4 +60,4 @@ fun test_4(a: Any?) {
runHigherOrder {
s.length // Should be OK
}
}
\ No newline at end of file
}
......@@ -23,4 +23,4 @@ fun test_3(x: Any) {
x.inc()
}
}
}
\ No newline at end of file
}
......@@ -9,4 +9,4 @@ fun test(a: Any) {
if (takeA(a as? A ?: return)) {
a.foo()
}
}
\ No newline at end of file
}
......@@ -89,4 +89,4 @@ fun test_4(x: Any) {
1 -> x.inc()
}
x.inc()
}
\ No newline at end of file
}
......@@ -16,12 +16,12 @@ fun test_1(x: A, y: A?) {
fun test_2(x: A?, y: A?) {
if (x == y) {
x.<!INAPPLICABLE_CANDIDATE!>foo<!>()
y.<!INAPPLICABLE_CANDIDATE!>foo<!>()
x.<!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>foo<!>()<!>
y.<!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>foo<!>()<!>
}
if (x === y) {
x.<!INAPPLICABLE_CANDIDATE!>foo<!>()
y.<!INAPPLICABLE_CANDIDATE!>foo<!>()
x.<!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>foo<!>()<!>
y.<!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>foo<!>()<!>
}
}
......@@ -35,4 +35,4 @@ fun test_3(x: A?, y: A?) {
x.foo()
y.foo()
}
}
\ No newline at end of file
}
......@@ -33,4 +33,4 @@ fun d() {
koko = null
}
}
}
\ No newline at end of file
}
......@@ -11,4 +11,4 @@ fun Q.foo() {
when (this) {
is B -> x // unresolved
}
}
\ No newline at end of file
}
......@@ -9,4 +9,4 @@ fun main(a: A) {
if (a === X) {
foo(a)
}
}
\ No newline at end of file
}
......@@ -30,4 +30,4 @@ fun test_3(x: Any?) {
}
x.bar()
}
}
\ No newline at end of file
}
......@@ -20,4 +20,4 @@ private fun foo(p: Sealed) {
is SubClass1 -> p.t
is SubClass2 -> "2"
}.length // should be resolved, but when is not considered as sealed because type of p is not a sealed class
}
\ No newline at end of file
}
......@@ -3,4 +3,4 @@ fun test(func: (() -> Unit)?) {
if (func != null) {
func()
}
}
\ No newline at end of file
}
......@@ -10,4 +10,4 @@ fun test() {
while (a is B || a is C) {
a.foo()
}
}
\ No newline at end of file
}
......@@ -44,7 +44,7 @@ fun test_4(x: Any, b: Boolean) {
}
break
}
x.<!UNRESOLVED_REFERENCE!>foo<!>() // No smartcast
x.<!UNRESOLVED_REFERENCE{LT}!><!UNRESOLVED_REFERENCE{PSI}!>foo<!>()<!> // No smartcast
}
fun test_5(x: Any, b: Boolean) {
......
......@@ -26,4 +26,4 @@ fun test_1() {
a.foo()
b.foo()
}
}
\ No newline at end of file
}
......@@ -39,18 +39,18 @@ fun test_1(x: A?) {
if (x != null) {
x.foo()
} else {
x.<!INAPPLICABLE_CANDIDATE!>foo<!>()
x.<!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>foo<!>()<!>
}
x.<!INAPPLICABLE_CANDIDATE!>foo<!>()
x.<!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>foo<!>()<!>
}
fun test_2(x: A?) {
if (x == null) {
x.<!INAPPLICABLE_CANDIDATE!>foo<!>()
x.<!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>foo<!>()<!>
} else {
x.foo()
}
x.<!INAPPLICABLE_CANDIDATE!>foo<!>()
x.<!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>foo<!>()<!>
}
fun test_3(x: A?) {
......@@ -83,8 +83,8 @@ fun test_6(q: Q?) {
fun test_7(q: Q?) {
if (q?.fdata()?.fs()?.inc() != null) {
q.fdata() // good
q.fdata().<!INAPPLICABLE_CANDIDATE!>fs<!>() // bad
q.fdata().<!INAPPLICABLE_CANDIDATE!>fs<!>().inc() // bad
q.fdata().<!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>fs<!>()<!> // bad
q.fdata().<!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>fs<!>()<!>.inc() // bad
}
}
......@@ -98,44 +98,44 @@ fun test_9(a: Int, b: Int?) {
if (a == b) {
b.inc()
}
b.<!INAPPLICABLE_CANDIDATE!>inc<!>()
b.<!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>inc<!>()<!>
if (a === b) {
b.inc()
}
b.<!INAPPLICABLE_CANDIDATE!>inc<!>()
b.<!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>inc<!>()<!>
if (b == a) {
b.inc()
}
b.<!INAPPLICABLE_CANDIDATE!>inc<!>()
b.<!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>inc<!>()<!>
if (b === a) {
b.inc()
}
b.<!INAPPLICABLE_CANDIDATE!>inc<!>()
b.<!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>inc<!>()<!>
}
fun test_10(a: Int?, b: Int?) {
if (a == b) {
b.<!INAPPLICABLE_CANDIDATE!>inc<!>()
b.<!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>inc<!>()<!>
}
b.<!INAPPLICABLE_CANDIDATE!>inc<!>()
b.<!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>inc<!>()<!>
if (a === b) {
b.<!INAPPLICABLE_CANDIDATE!>inc<!>()
b.<!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>inc<!>()<!>
}
b.<!INAPPLICABLE_CANDIDATE!>inc<!>()
b.<!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>inc<!>()<!>
if (b == a) {
b.<!INAPPLICABLE_CANDIDATE!>inc<!>()
b.<!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>inc<!>()<!>
}
b.<!INAPPLICABLE_CANDIDATE!>inc<!>()
b.<!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>inc<!>()<!>
if (b === a) {
b.<!INAPPLICABLE_CANDIDATE!>inc<!>()
b.<!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>inc<!>()<!>
}
b.<!INAPPLICABLE_CANDIDATE!>inc<!>()
b.<!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>inc<!>()<!>
}
fun test_11(q: QImpl?, q2: QImpl) {
......
......@@ -4,24 +4,24 @@ fun String.foo() {}
fun test_1(a: Any?) {
when (a) {
is String, is Any -> a.<!INAPPLICABLE_CANDIDATE!>foo<!>() // Should be Bad
is String, is Any -> a.<!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>foo<!>()<!> // Should be Bad
}
}
fun test_2(a: Any?) {
if (a is String || a is Any) {
a.<!INAPPLICABLE_CANDIDATE!>foo<!>() // Should be Bad
a.<!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>foo<!>()<!> // Should be Bad
}
}
fun test_3(a: Any?, b: Boolean) {
when (a) {
is String, b -> a.<!INAPPLICABLE_CANDIDATE!>foo<!>() // Should be Bad
is String, b -> a.<!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>foo<!>()<!> // Should be Bad
}
}
fun test_4(a: Any?, b: Boolean) {
if (a is String || b) {
a.<!INAPPLICABLE_CANDIDATE!>foo<!>() // Should be Bad
a.<!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>foo<!>()<!> // Should be Bad
}
}
\ No newline at end of file
}
......@@ -15,4 +15,4 @@ fun Any.test_2(): Int = when (val x = this) {
length
}
else -> 0
}
\ No newline at end of file
}
......@@ -14,23 +14,23 @@ fun Any?.test_1() {
this.foo()
foo()
} else {
this.<!UNRESOLVED_REFERENCE!>foo<!>()
<!UNRESOLVED_REFERENCE!>foo<!>()
this.<!UNRESOLVED_REFERENCE{LT}!><!UNRESOLVED_REFERENCE{PSI}!>foo<!>()<!>
<!UNRESOLVED_REFERENCE{LT}!><!UNRESOLVED_REFERENCE{PSI}!>foo<!>()<!>
}
this.<!UNRESOLVED_REFERENCE!>foo<!>()
<!UNRESOLVED_REFERENCE!>foo<!>()
this.<!UNRESOLVED_REFERENCE{LT}!><!UNRESOLVED_REFERENCE{PSI}!>foo<!>()<!>
<!UNRESOLVED_REFERENCE{LT}!><!UNRESOLVED_REFERENCE{PSI}!>foo<!>()<!>
}
fun Any?.test_2() {
if (this !is A) {
this.<!UNRESOLVED_REFERENCE!>foo<!>()
<!UNRESOLVED_REFERENCE!>foo<!>()
this.<!UNRESOLVED_REFERENCE{LT}!><!UNRESOLVED_REFERENCE{PSI}!>foo<!>()<!>
<!UNRESOLVED_REFERENCE{LT}!><!UNRESOLVED_REFERENCE{PSI}!>foo<!>()<!>
} else {
this.foo()
foo()
}
this.<!UNRESOLVED_REFERENCE!>foo<!>()
<!UNRESOLVED_REFERENCE!>foo<!>()
this.<!UNRESOLVED_REFERENCE{LT}!><!UNRESOLVED_REFERENCE{PSI}!>foo<!>()<!>
<!UNRESOLVED_REFERENCE{LT}!><!UNRESOLVED_REFERENCE{PSI}!>foo<!>()<!>
}
fun test_3(a: Any, b: Any, c: Any) {
......@@ -49,13 +49,13 @@ fun test_3(a: Any, b: Any, c: Any) {
fun Any?.test_4() {
if (this !is A) {
this.<!UNRESOLVED_REFERENCE!>foo<!>()
<!UNRESOLVED_REFERENCE!>foo<!>()
this.<!UNRESOLVED_REFERENCE!>bar<!>()
<!UNRESOLVED_REFERENCE!>bar<!>()
this.<!UNRESOLVED_REFERENCE{LT}!><!UNRESOLVED_REFERENCE{PSI}!>foo<!>()<!>
<!UNRESOLVED_REFERENCE{LT}!><!UNRESOLVED_REFERENCE{PSI}!>foo<!>()<!>
this.<!UNRESOLVED_REFERENCE{LT}!><!UNRESOLVED_REFERENCE{PSI}!>bar<!>()<!>
<!UNRESOLVED_REFERENCE{LT}!><!UNRESOLVED_REFERENCE{PSI}!>bar<!>()<!>
} else if (this !is B) {
this.<!UNRESOLVED_REFERENCE!>bar<!>()
<!UNRESOLVED_REFERENCE!>bar<!>()
this.<!UNRESOLVED_REFERENCE{LT}!><!UNRESOLVED_REFERENCE{PSI}!>bar<!>()<!>
<!UNRESOLVED_REFERENCE{LT}!><!UNRESOLVED_REFERENCE{PSI}!>bar<!>()<!>
this.foo()
foo()
} else {
......@@ -64,10 +64,10 @@ fun Any?.test_4() {
this.bar()
bar()
}
this.<!UNRESOLVED_REFERENCE!>foo<!>()
<!UNRESOLVED_REFERENCE!>foo<!>()
this.<!UNRESOLVED_REFERENCE!>bar<!>()
<!UNRESOLVED_REFERENCE!>bar<!>()
this.<!UNRESOLVED_REFERENCE{LT}!><!UNRESOLVED_REFERENCE{PSI}!>foo<!>()<!>
<!UNRESOLVED_REFERENCE{LT}!><!UNRESOLVED_REFERENCE{PSI}!>foo<!>()<!>
this.<!UNRESOLVED_REFERENCE{LT}!><!UNRESOLVED_REFERENCE{PSI}!>bar<!>()<!>
<!UNRESOLVED_REFERENCE{LT}!><!UNRESOLVED_REFERENCE{PSI}!>bar<!>()<!>
}
fun Any.test_5(): Int = when {
......@@ -81,4 +81,4 @@ fun Any.test_6() {
size
this as String
length
}
\ No newline at end of file
}
......@@ -11,4 +11,4 @@ class Wrapper(val s: String?) {
}
}
<!CONFLICTING_OVERLOADS!>fun takeString(s: String) {}<!>
\ No newline at end of file
<!CONFLICTING_OVERLOADS!>fun takeString(s: String) {}<!>
......@@ -57,4 +57,4 @@ fun test_2(a: B?) {
val a = x as? B ?: return
a.foo() // Should be OK
x.foo() // Should be OK
}<!>
\ No newline at end of file
}<!>
......@@ -31,4 +31,4 @@ fun test_4(s: String?) {
} else {
s.length // Should be OK
}
}
\ No newline at end of file
}
......@@ -22,17 +22,17 @@ fun test_3(x: Any) {
(x as? A)?.bar(x)?.foo(x.bool())?.let {
x.bool()
}
x.<!UNRESOLVED_REFERENCE!>bool<!>()
x.<!UNRESOLVED_REFERENCE{LT}!><!UNRESOLVED_REFERENCE{PSI}!>bool<!>()<!>
}
fun test_4(x: A?) {
x?.id()?.bool()
x.<!INAPPLICABLE_CANDIDATE!>id<!>()
x.<!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>id<!>()<!>
}
fun Any?.boo(b: Boolean) {}
fun test_5(x: A?) {
x?.let { return }?.boo(x.bool())
x.<!INAPPLICABLE_CANDIDATE!>id<!>()
}
\ No newline at end of file
x.<!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>id<!>()<!>
}
......@@ -13,4 +13,4 @@ fun test_2(b: B) {
if (b.x is String) {
b.x.length
}
}
\ No newline at end of file
}
......@@ -11,5 +11,5 @@ fun test(b: Boolean) {
} else {
a = null
}
a.<!INAPPLICABLE_CANDIDATE!>foo<!>()
}
\ No newline at end of file
a.<!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>foo<!>()<!>
}
......@@ -19,4 +19,4 @@ fun test_3() {
x.length
x = null
x.<!INAPPLICABLE_CANDIDATE!>length<!>
}
\ No newline at end of file
}
......@@ -25,4 +25,4 @@ fun testFromJava() {
val values = Utils.getStrings()
val list = myListOf(*values)
takeStrings(list)
}
\ No newline at end of file
}
import java.util.*
val x: SortedSet<Int> = TreeSet()
\ No newline at end of file
val x: SortedSet<Int> = TreeSet()
......@@ -14,4 +14,4 @@ fun test() {
materialize() // Should be an errror
}
)
}
\ No newline at end of file
}
......@@ -10,10 +10,10 @@ interface C {
fun baz()
}
interface <!CONSTRUCTOR_IN_INTERFACE!>Inv<K, T>()<!> {
<!CONSTRUCTOR_IN_INTERFACE{LT}!>interface <!CONSTRUCTOR_IN_INTERFACE{PSI}!>Inv<K, T>()<!> {
fun k(): K
fun t(): T
}
}<!>
typealias Inv0 = Inv<A, B>
typealias Inv1<X> = Inv<A, X>
......@@ -42,7 +42,7 @@ fun test_2(inv: Inv2<A, B>) {
fun test_3(inv: Inv3<A, B, C>) {
inv.k().foo()
inv.t().<!UNRESOLVED_REFERENCE!>bar<!>()
inv.t().<!UNRESOLVED_REFERENCE{LT}!><!UNRESOLVED_REFERENCE{PSI}!>bar<!>()<!>
inv.t().baz()
}
......@@ -74,21 +74,21 @@ typealias Invariant1<X> = Invariant<X>
fun test_5(a: A, in1: In1<A>, in2: In1<in A>, in3: In1<out A>) {
in1.take(a)
in2.take(a)
in3.<!UNRESOLVED_REFERENCE!>take<!>(a)
in3.<!UNRESOLVED_REFERENCE{LT}!><!UNRESOLVED_REFERENCE{PSI}!>take<!>(a)<!>
}
fun test_6(a: A, out1: Out1<A>, out2: Out1<in A>, out3: Out1<out A>) {
out1.value().foo()
out2.<!UNRESOLVED_REFERENCE!>value<!>().<!UNRESOLVED_REFERENCE!>foo<!>()
out2.<!UNRESOLVED_REFERENCE{LT}!><!UNRESOLVED_REFERENCE{PSI}!>value<!>()<!>.<!UNRESOLVED_REFERENCE{LT}!><!UNRESOLVED_REFERENCE{PSI}!>foo<!>()<!>
out3.value().foo()
}
fun test_7(a: A, inv1: Invariant1<A>, inv2: Invariant1<in A>, inv3: Invariant1<out A>) {
inv1.value().foo()
inv2.value().<!UNRESOLVED_REFERENCE!>foo<!>()
inv2.value().<!UNRESOLVED_REFERENCE{LT}!><!UNRESOLVED_REFERENCE{PSI}!>foo<!>()<!>
inv3.value().foo()
inv1.take(a)
inv2.take(a)
inv3.<!INAPPLICABLE_CANDIDATE!>take<!>(a)
}
\ No newline at end of file
inv3.<!INAPPLICABLE_CANDIDATE{LT}!><!INAPPLICABLE_CANDIDATE{PSI}!>take<!>(a)<!>
}
......@@ -9,4 +9,4 @@ val w: Int get(): Int = 1
interface Some {
val bar: Int get() = 1
}
\ No newline at end of file
}
......@@ -13,7 +13,7 @@ abstract class My<T : Some> {
abstract val z: test.My.T
class Some : <!OTHER_ERROR, UNRESOLVED_REFERENCE!>T<!>()
class Some : <!UNRESOLVED_REFERENCE{LT}!><!OTHER_ERROR, UNRESOLVED_REFERENCE{PSI}!>T<!>()<!>
}
abstract class Your<T : Some> : <!OTHER_ERROR!>T<!>
......@@ -10,4 +10,4 @@ class A<T1, T2> {
fun <R1, R2, R3> foo(c: A<R1, R1>.B<R2, R2>.C<R3, R3>) {}
fun <R3> foo(c: A.B.C<R3, R3>) {}
\ No newline at end of file
fun <R3> foo(c: A.B.C<R3, R3>) {}
......@@ -7,4 +7,4 @@ fun foo(): () -> Boolean {
} else {
return { true }
}
}
\ No newline at end of file
}
......@@ -6,4 +6,4 @@ class B {
fun foo(<!EXPOSED_PARAMETER_TYPE!>value: A.AInner<!>) {
}
}
\ No newline at end of file
}
......@@ -5,7 +5,7 @@ class A {
}
abstract class B {
fun <!EXPOSED_FUNCTION_RETURN_TYPE!>foo<!>(str: String): A.InnerA
<!EXPOSED_FUNCTION_RETURN_TYPE{LT}!>fun <!EXPOSED_FUNCTION_RETURN_TYPE{PSI}!>foo<!>(str: String): A.InnerA<!>
}
private enum class Some {
......
......@@ -17,7 +17,7 @@ class Property {
var var1: String
var var2: String
var var3: Int
var <!EXPOSED_PROPERTY_TYPE!>var4<!>: A.AInnerPrivate
<!EXPOSED_PROPERTY_TYPE{LT}!>var <!EXPOSED_PROPERTY_TYPE{PSI}!>var4<!>: A.AInnerPrivate<!>
var var5: A.AInnerPublic
var <!EXPOSED_PROPERTY_TYPE!>var6<!>: A.AInnerProtectedEnum
}
\ No newline at end of file
<!EXPOSED_PROPERTY_TYPE{LT}!>var <!EXPOSED_PROPERTY_TYPE{PSI}!>var6<!>: A.AInnerProtectedEnum<!>
}
......@@ -38,7 +38,7 @@ interface E {
}
class Test2 : A.APublicI, <!UNRESOLVED_REFERENCE!>B.BInner<!>() {
class Test2 : A.APublicI, <!UNRESOLVED_REFERENCE{LT}!><!UNRESOLVED_REFERENCE{PSI}!>B.BInner<!>()<!> {
}
......@@ -50,7 +50,7 @@ class Test4 : E, A.AProtectedI {
}
class Test5 : C.CPublicI, <!UNRESOLVED_REFERENCE!>B.BInner<!>() {
class Test5 : C.CPublicI, <!UNRESOLVED_REFERENCE{LT}!><!UNRESOLVED_REFERENCE{PSI}!>B.BInner<!>()<!> {
}
......@@ -60,4 +60,4 @@ class Test6 : E, <!EXPOSED_SUPER_CLASS!>C.CPublic<!> {
class Test7 : <!UNRESOLVED_REFERENCE!>D.PublicButProtected<!> {
}
\ No newline at end of file
}
......@@ -2,7 +2,7 @@ class A {
private inner class Inner
}
class B {
typealias <!EXPOSED_TYPEALIAS_EXPANDED_TYPE!>AInner<!> = A.Inner
<!EXPOSED_TYPEALIAS_EXPANDED_TYPE{LT}!>typealias <!EXPOSED_TYPEALIAS_EXPANDED_TYPE{PSI}!>AInner<!> = A.Inner<!>
inner class Inner
}
......@@ -10,9 +10,9 @@ class C {
typealias BInner = B.Inner
}
typealias <!EXPOSED_TYPEALIAS_EXPANDED_TYPE!>AInner0<!> = A.Inner
<!EXPOSED_TYPEALIAS_EXPANDED_TYPE{LT}!>typealias <!EXPOSED_TYPEALIAS_EXPANDED_TYPE{PSI}!>AInner0<!> = A.Inner<!>
typealias BInner0 = B.Inner
private typealias MyString = String
fun foo(): MyString = ""
\ No newline at end of file
fun foo(): MyString = ""
......@@ -32,4 +32,4 @@ public class Container : C {
}
// invalid, A is private, B is internal, D is protected
public interface Test8<T: <!EXPOSED_TYPE_PARAMETER_BOUND!>A<!>, P: <!EXPOSED_TYPE_PARAMETER_BOUND!>B<!>, F: C, N: <!EXPOSED_TYPE_PARAMETER_BOUND!>C.D<!>, M: E>
\ No newline at end of file
public interface Test8<T: <!EXPOSED_TYPE_PARAMETER_BOUND!>A<!>, P: <!EXPOSED_TYPE_PARAMETER_BOUND!>B<!>, F: C, N: <!EXPOSED_TYPE_PARAMETER_BOUND!>C.D<!>, M: E>
......@@ -2,12 +2,12 @@ class A {
companion object Comp {}
fun foo() {
<!HIDDEN!>Comp<!>()
<!HIDDEN{LT}!><!HIDDEN{PSI}!>Comp<!>()<!>
}
}
object B {
private val x = <!HIDDEN!>B<!>()
private val x = <!HIDDEN{LT}!><!HIDDEN{PSI}!>B<!>()<!>
}
class D {
......@@ -26,6 +26,6 @@ enum class E {
};
fun foo() {
<!UNRESOLVED_REFERENCE!>X<!>()
<!UNRESOLVED_REFERENCE{LT}!><!UNRESOLVED_REFERENCE{PSI}!>X<!>()<!>
}
}
......@@ -19,5 +19,5 @@ abstract class A {
// FILE: main.kt
fun test(b: B): String {
return b <!HIDDEN!>foo<!> "hello" // should be an error
return <!HIDDEN{LT}!>b <!HIDDEN{PSI}!>foo<!> "hello"<!> // should be an error
}
......@@ -9,4 +9,4 @@ fun foo(b: Boolean, a: Int) {
}?.also {
1
}
}
\ No newline at end of file
}
......@@ -53,4 +53,4 @@ fun case3() {
A.A1 -> B() //should be INCOMPATIBLE_TYPES
A.A2 -> B() //should be INCOMPATIBLE_TYPES
}
}
\ No newline at end of file
}
......@@ -6,4 +6,4 @@ fun takeA(a: A) {}
fun test() {
takeA(if(true) materialize() else materialize())
}
\ No newline at end of file
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册