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,19 +0,0 @@
@DslMarker
annotation class MyDsl
@MyDsl
interface Foo<T> {
val x: Int
}
val Foo<*>.bad: Int get() = x
fun Foo<*>.badFun(): Int = x
val Foo<Int>.good: Int get() = x
fun test(foo: Foo<*>) {
foo.apply {
x
}
}
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
@DslMarker
annotation class MyDsl
@@ -1,25 +0,0 @@
// !DIAGNOSTICS: -UNUSED_PARAMETER
@DslMarker
annotation class MyDsl
@MyDsl
interface Scope<A, B> {
val something: A
val value: B
}
fun scoped1(block: Scope<Int, String>.() -> Unit) {}
fun scoped2(block: Scope<*, String>.() -> Unit) {}
val <T> Scope<*, T>.property: T get() = value
fun f() {
scoped1 {
value
property
}
scoped2 {
value
property
}
}
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
// !DIAGNOSTICS: -UNUSED_PARAMETER
@DslMarker
@@ -1,11 +0,0 @@
@DslMarker
annotation class AnnMarker
@AnnMarker
class Inv<T> {
fun bar() {}
}
fun Inv<*>.foo() {
bar()
}
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
@DslMarker
annotation class AnnMarker
@@ -1,28 +0,0 @@
// !LANGUAGE: -DslMarkersSupport
// !DIAGNOSTICS: -UNUSED_PARAMETER
@DslMarker
annotation class Ann
@Ann
class A {
fun a() = 1
}
@Ann
class B {
fun b() = 2
}
fun foo(x: A.() -> Unit) {}
fun bar(x: B.() -> Unit) {}
fun test() {
foo {
a()
bar {
a()
this@foo.a()
b()
}
}
}
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
// !LANGUAGE: -DslMarkersSupport
// !DIAGNOSTICS: -UNUSED_PARAMETER
@DslMarker