Introduce FIR_IDENTICAL for FIR vs old frontend tests #KT-36879 Fixed
This commit is contained in:
-18
@@ -1,18 +0,0 @@
|
||||
// !CHECK_TYPE
|
||||
// !DIAGNOSTICS: -UNUSED_EXPRESSION -UNUSED_PARAMETER -UNUSED_VARIABLE
|
||||
|
||||
class A
|
||||
|
||||
class B {
|
||||
fun foo() = this
|
||||
}
|
||||
|
||||
fun test(foo: A.() -> Int) {
|
||||
with(A()) {
|
||||
foo() checkType { _<Int>() }
|
||||
with(B()) {
|
||||
foo() checkType { _<B>() }
|
||||
this.foo() checkType { _<B>() }
|
||||
}
|
||||
}
|
||||
}
|
||||
+1
@@ -1,3 +1,4 @@
|
||||
// FIR_IDENTICAL
|
||||
// !CHECK_TYPE
|
||||
// !DIAGNOSTICS: -UNUSED_EXPRESSION -UNUSED_PARAMETER -UNUSED_VARIABLE
|
||||
|
||||
|
||||
-13
@@ -1,13 +0,0 @@
|
||||
// !CHECK_TYPE
|
||||
// !DIAGNOSTICS: -UNUSED_EXPRESSION -UNUSED_PARAMETER -UNUSED_VARIABLE
|
||||
|
||||
class A {
|
||||
fun foo() = this
|
||||
}
|
||||
|
||||
fun test(foo: A.() -> Int) {
|
||||
with(A()) {
|
||||
foo() checkType { _<A>() }
|
||||
this.foo() checkType { _<A>() }
|
||||
}
|
||||
}
|
||||
+1
@@ -1,3 +1,4 @@
|
||||
// FIR_IDENTICAL
|
||||
// !CHECK_TYPE
|
||||
// !DIAGNOSTICS: -UNUSED_EXPRESSION -UNUSED_PARAMETER -UNUSED_VARIABLE
|
||||
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
// !DIAGNOSTICS: -UNUSED_EXPRESSION -UNUSED_PARAMETER -UNUSED_VARIABLE
|
||||
// KT-9810 Local variable vs property from implicit receiver
|
||||
|
||||
class A {
|
||||
val foo = 2
|
||||
}
|
||||
|
||||
fun test(foo: String) {
|
||||
with(A()) {
|
||||
val g: String = foo // locals win
|
||||
}
|
||||
}
|
||||
@@ -1,3 +1,4 @@
|
||||
// FIR_IDENTICAL
|
||||
// !DIAGNOSTICS: -UNUSED_EXPRESSION -UNUSED_PARAMETER -UNUSED_VARIABLE
|
||||
// KT-9810 Local variable vs property from implicit receiver
|
||||
|
||||
|
||||
-36
@@ -1,36 +0,0 @@
|
||||
// !CHECK_TYPE
|
||||
// !DIAGNOSTICS: -UNUSED_EXPRESSION -UNUSED_PARAMETER -UNUSED_VARIABLE
|
||||
|
||||
// FILE: A.java
|
||||
public class A {
|
||||
public A getFoo() { return 3; }
|
||||
}
|
||||
|
||||
// FILE: B.java
|
||||
public class B {
|
||||
public B getFoo() { return ""; }
|
||||
}
|
||||
|
||||
// FILE: 1.kt
|
||||
class C(val foo: C)
|
||||
|
||||
fun test(a: A, b: B, c: C) {
|
||||
with(a) {
|
||||
with(b) {
|
||||
foo checkType { _<B>() }
|
||||
}
|
||||
foo checkType { _<A>() }
|
||||
}
|
||||
|
||||
with(a) {
|
||||
with(c) {
|
||||
foo checkType { _<C>() }
|
||||
}
|
||||
}
|
||||
|
||||
with(c) {
|
||||
with(a) {
|
||||
foo checkType { _<A>() }
|
||||
}
|
||||
}
|
||||
}
|
||||
+1
@@ -1,3 +1,4 @@
|
||||
// FIR_IDENTICAL
|
||||
// !CHECK_TYPE
|
||||
// !DIAGNOSTICS: -UNUSED_EXPRESSION -UNUSED_PARAMETER -UNUSED_VARIABLE
|
||||
|
||||
|
||||
Reference in New Issue
Block a user