question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

guard with "break"/"continue" no longer works in 1.2.3

See original GitHub issue

This 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:closed
  • Created 7 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
gavinkingcommented, Apr 26, 2016

I have figured out how to make this work correctly.

0reactions
gavinkingcommented, Apr 21, 2016

Well the previous implementation was completely wrong, to begin with.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found