KT-1436 Nicer compiler errors when the feature isn't supported

This commit is contained in:
Pavel Mikhailovskii
2022-10-14 09:42:56 +02:00
committed by teamcity
parent e6900ec0f2
commit 1215ae0fe7
11 changed files with 103 additions and 24 deletions
@@ -6,14 +6,14 @@
fun case_1(value_1: Boolean) {
while (value_1) {
funWithExactlyOnceCallsInPlace {
<!BREAK_OR_CONTINUE_JUMPS_ACROSS_FUNCTION_BOUNDARY!>break<!>
<!UNSUPPORTED_FEATURE!>break<!>
}
println("1")
}
loop@ for (i in 0..10) {
funWithExactlyOnceCallsInPlace {
<!BREAK_OR_CONTINUE_JUMPS_ACROSS_FUNCTION_BOUNDARY!>break@loop<!>
<!UNSUPPORTED_FEATURE!>break@loop<!>
}
println("1")
}
@@ -23,14 +23,14 @@ fun case_1(value_1: Boolean) {
fun case_2(value_1: Boolean) {
for (i in 0..10) {
funWithExactlyOnceCallsInPlace {
<!BREAK_OR_CONTINUE_JUMPS_ACROSS_FUNCTION_BOUNDARY!>continue<!>
<!UNSUPPORTED_FEATURE!>continue<!>
}
println("1")
}
loop@ while (value_1) {
funWithExactlyOnceCallsInPlace {
<!BREAK_OR_CONTINUE_JUMPS_ACROSS_FUNCTION_BOUNDARY!>continue@loop<!>
<!UNSUPPORTED_FEATURE!>continue@loop<!>
}
println("1")
}
@@ -14,14 +14,14 @@
fun case_1(value_1: Boolean) {
while (value_1) {
funWithExactlyOnceCallsInPlace {
<!BREAK_OR_CONTINUE_JUMPS_ACROSS_FUNCTION_BOUNDARY!>break<!>
<!UNSUPPORTED_FEATURE!>break<!>
}
println("1")
}
loop@ for (i in 0..10) {
funWithExactlyOnceCallsInPlace {
<!BREAK_OR_CONTINUE_JUMPS_ACROSS_FUNCTION_BOUNDARY!>break@loop<!>
<!UNSUPPORTED_FEATURE!>break@loop<!>
}
println("1")
}
@@ -31,14 +31,14 @@ fun case_1(value_1: Boolean) {
fun case_2(value_1: Boolean) {
for (i in 0..10) {
funWithExactlyOnceCallsInPlace {
<!BREAK_OR_CONTINUE_JUMPS_ACROSS_FUNCTION_BOUNDARY!>continue<!>
<!UNSUPPORTED_FEATURE!>continue<!>
}
println("1")
}
loop@ while (value_1) {
funWithExactlyOnceCallsInPlace {
<!BREAK_OR_CONTINUE_JUMPS_ACROSS_FUNCTION_BOUNDARY!>continue@loop<!>
<!UNSUPPORTED_FEATURE!>continue@loop<!>
}
println("1")
}