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

workaround for #2043 #2068

Merged
merged 1 commit into from
Mar 15, 2019
Merged

workaround for #2043 #2068

merged 1 commit into from
Mar 15, 2019

Conversation

Hejsil
Copy link
Contributor

@Hejsil Hejsil commented Mar 15, 2019

As mentioned here #1685 broke this code:

test "" {
    var a: usize = 0;
    x: {
        break :x &a;
    }.* = 1;
}

This PR changes translate-c to output valid code again. The way this is done, is to trick the parser into parsing an expression at stmt level instead of a labeled block:

test "" {
    var a: usize = 0;
    (x: {
        break :x &a;
    }).* = 1;
}

@andrewrk andrewrk merged commit 4090fe8 into master Mar 15, 2019
@Hejsil Hejsil deleted the workaround-for-2043 branch March 15, 2019 16:30
@ghost
Copy link

ghost commented Mar 16, 2019

Thanks Hejsil, that got my project oxid working again

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants