Created
March 28, 2022 15:59
-
-
Save eseidelGoogle/cbdec4750cae0edda85029d894c804d5 to your computer and use it in GitHub Desktop.
named break used incorrectly?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
enum Thing { | |
one, | |
two, | |
} | |
void main() { | |
var thing = Thing.one; | |
goback: | |
switch (thing) { | |
case Thing.one: | |
print("one"); | |
thing = Thing.two; | |
break goback; | |
case Thing.two: | |
print("two"); | |
break; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment