Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using labeled break cause defer in same block to fail compiling. #830

Closed
Hejsil opened this issue Mar 13, 2018 · 0 comments
Closed

Using labeled break cause defer in same block to fail compiling. #830

Hejsil opened this issue Mar 13, 2018 · 0 comments
Labels
bug Observed behavior contradicts documented or intended behavior
Milestone

Comments

@Hejsil
Copy link
Sponsor Contributor

Hejsil commented Mar 13, 2018

test "" {
    var i = usize(0);

    blk: {
        defer i += 1;  // error: unreachable code
        break :blk;
    }
}
@andrewrk andrewrk added the bug Observed behavior contradicts documented or intended behavior label Mar 13, 2018
@andrewrk andrewrk modified the milestones: 0.2.0, 0.3.0 Mar 13, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Observed behavior contradicts documented or intended behavior
Projects
None yet
Development

No branches or pull requests

2 participants