Introduce FIR_IDENTICAL for FIR vs old frontend tests #KT-36879 Fixed
This commit is contained in:
@@ -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,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,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,3 +1,4 @@
|
||||
// FIR_IDENTICAL
|
||||
// !DIAGNOSTICS: -UNUSED_VARIABLE
|
||||
//KT-4603 Labeling information is lost when passing through local classes or objects
|
||||
|
||||
|
||||
Reference in New Issue
Block a user