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,9 +0,0 @@
// !DIAGNOSTICS: -UNUSED_VARIABLE
//KT-3920 Labeling information is lost when passing through some expressions
fun test() {
run f@{
val x = if (1 > 2) return@f 1 else 2
2
}
}
+1
View File
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
// !DIAGNOSTICS: -UNUSED_VARIABLE
//KT-3920 Labeling information is lost when passing through some expressions
@@ -1,17 +0,0 @@
// !DIAGNOSTICS: -UNUSED_VARIABLE
//KT-4586 this@ does not work for builders
fun string(init: StringBuilder.() -> Unit): String{
val answer = StringBuilder()
answer.init()
return answer.toString()
}
val str = string l@{
append("hello, ")
val sub = string {
append("world!")
this@l.append(this)
}
}
+1
View File
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
// !DIAGNOSTICS: -UNUSED_VARIABLE
//KT-4586 this@ does not work for builders
@@ -1,12 +0,0 @@
// !DIAGNOSTICS: -UNUSED_VARIABLE
//KT-4603 Labeling information is lost when passing through local classes or objects
fun foo() {
val s: Int.() -> Unit = l@{
class Local(val y: Int = this@l) {
fun bar() {
val x: Int = this@l //unresolved
}
}
}
}
+1
View File
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
// !DIAGNOSTICS: -UNUSED_VARIABLE
//KT-4603 Labeling information is lost when passing through local classes or objects