Fixed test data for new lambda syntax
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
fun nonlocals(b : Boolean) {
|
||||
@a<!UNUSED_FUNCTION_LITERAL!>{(): Int ->
|
||||
@a<!UNUSED_FUNCTION_LITERAL!>{
|
||||
fun foo() {
|
||||
if (b) {
|
||||
<!RETURN_NOT_ALLOWED!>return@a 1<!> // The label must be resolved, but an error should be reported for a non-local return
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
//KT-3920 Labeling information is lost when passing through some expressions
|
||||
|
||||
fun test() {
|
||||
run @f{ (): Int ->
|
||||
run @f{
|
||||
val x = if (1 > 2) return@f 1 else 2
|
||||
2
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
//KT-4603 Labeling information is lost when passing through local classes or objects
|
||||
|
||||
fun foo() {
|
||||
val s = @l{ Int.() ->
|
||||
val s: Int.() -> Unit = @l{
|
||||
class Local(val y: Int = this@l) {
|
||||
fun bar() {
|
||||
val x: Int = this@l //unresolved
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
//KT-591 Unresolved label in valid code
|
||||
|
||||
fun test() {
|
||||
val <!UNUSED_VARIABLE!>a<!> = @a{(Int?).() ->
|
||||
val <!UNUSED_VARIABLE!>a<!>: (Int?).() -> Unit = @a{
|
||||
if (this != null) {
|
||||
val <!UNUSED_VARIABLE!>b<!> = {String.() ->
|
||||
val <!UNUSED_VARIABLE!>b<!>: String.() -> Unit = {
|
||||
<!DEBUG_INFO_SMARTCAST!>this@a<!>.times(5) // @a Unresolved
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user