Introduce FIR_IDENTICAL for FIR vs old frontend tests #KT-36879 Fixed

This commit is contained in:
Mikhail Glukhikh
2020-03-04 17:54:33 +03:00
parent 186e0b0cba
commit 8884cbe415
2268 changed files with 1175 additions and 19754 deletions
@@ -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,3 +1,4 @@
// FIR_IDENTICAL
// !CHECK_TYPE
// !DIAGNOSTICS: -UNUSED_EXPRESSION -UNUSED_PARAMETER -UNUSED_VARIABLE
@@ -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,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
@@ -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,3 +1,4 @@
// FIR_IDENTICAL
// !CHECK_TYPE
// !DIAGNOSTICS: -UNUSED_EXPRESSION -UNUSED_PARAMETER -UNUSED_VARIABLE