guard with "break"/"continue" no longer works in 1.2.3
See original GitHub issueThis compiles and runs on 1.2.2
but not 1.2.3
master:
shared void run() {
for (i in 0:1) {
String? s = "";
if (!exists s) {
break; // or continue;
}
print(s.size);
}
}
on master:
source/simple/run.ceylon:7: error: method or attribute does not exist: 'size' in type 'String?'
print(s.size);
^
1 error
Issue Analytics
- State:
- Created 7 years ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
"'break' is only allowed inside a loop, if, do, or switch" error ...
It is perfectly valid to use break inside a guard statement. But the break applies to the outer context. From the language reference:...
Read more >How to break out of a guard statement outside of a function?
You can use return or throw to exit a function, or break or continue to exit the current loop. The problem is, you...
Read more >Process Memory - Anti-Debug Tricks
Afterward, the OS makes a copy of this page and map it to the process virtual memory so this page is no longer...
Read more >dafi36-3211.pdf - Air Force
In Part 4, PALACE CHASE Programs, major changes include breaking enlisted and officer programs out into separate sections.
Read more >VOLUME 7A - Under Secretary of Defense (Comptroller)
A break in service (e.g., released from active duty, discharged) does not disqualify an officer for the saved pay and allowances ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I have figured out how to make this work correctly.
Well the previous implementation was completely wrong, to begin with.