Resolve control label locally when label name clashes with fun name
#KT-5354 Fixed #KT-15085 Fixed
This commit is contained in:
Vendored
+53
@@ -0,0 +1,53 @@
|
||||
fun test1() {
|
||||
test1@ for(i in 1..2) {
|
||||
continue<!LABEL_NAME_CLASH!>@test1<!>
|
||||
}
|
||||
}
|
||||
|
||||
fun test2() {
|
||||
test2@ while (true) {
|
||||
break<!LABEL_NAME_CLASH!>@test2<!>
|
||||
}
|
||||
}
|
||||
|
||||
class Test3 {
|
||||
fun Test3() {
|
||||
Test3@ while (true) {
|
||||
break<!LABEL_NAME_CLASH!>@Test3<!>
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fun test4() {
|
||||
<!NOT_A_LOOP_LABEL!>break@test4<!>
|
||||
}
|
||||
|
||||
class Test5 {
|
||||
fun Test5<!SYNTAX!><!> {
|
||||
return@Test5
|
||||
}
|
||||
}
|
||||
|
||||
class Test6 {
|
||||
fun Test6() {
|
||||
Test6@ while (true) {
|
||||
break<!LABEL_NAME_CLASH!>@Test6<!>
|
||||
}
|
||||
|
||||
Test6@ while (true) {
|
||||
break<!LABEL_NAME_CLASH!>@Test6<!>
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class Test7 {
|
||||
fun Test7() {
|
||||
Test8@ while (true) {
|
||||
<!NOT_A_LOOP_LABEL!>break@Test7<!>
|
||||
}
|
||||
|
||||
<!UNREACHABLE_CODE!>Test7@ while (true) {
|
||||
<!NOT_A_LOOP_LABEL!>break<!UNRESOLVED_REFERENCE!>@Test8<!><!>
|
||||
}<!>
|
||||
}
|
||||
}
|
||||
Vendored
+37
@@ -0,0 +1,37 @@
|
||||
package
|
||||
|
||||
public fun test1(): kotlin.Unit
|
||||
public fun test2(): kotlin.Unit
|
||||
public fun test4(): kotlin.Unit
|
||||
|
||||
public final class Test3 {
|
||||
public constructor Test3()
|
||||
public final fun Test3(): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public final class Test5 {
|
||||
public constructor Test5()
|
||||
public final fun Test5(): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public final class Test6 {
|
||||
public constructor Test6()
|
||||
public final fun Test6(): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
public final class Test7 {
|
||||
public constructor Test7()
|
||||
public final fun Test7(): kotlin.Unit
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
Reference in New Issue
Block a user