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

if statement suppresses error for ignoring return value #291

Closed
thejoshwolfe opened this issue Mar 31, 2017 · 1 comment
Closed

if statement suppresses error for ignoring return value #291

thejoshwolfe opened this issue Mar 31, 2017 · 1 comment
Labels
bug Observed behavior contradicts documented or intended behavior
Milestone

Comments

@thejoshwolfe
Copy link
Contributor

fn foo() -> %void {}
fn main() {
    foo(); // error: return value ignored
    if (true) foo(); // no complaint
}

This mistake is made in elf.zig:236

I have a suspicion this will be solved by the code changes required by #287.

@thejoshwolfe thejoshwolfe added the bug Observed behavior contradicts documented or intended behavior label Mar 31, 2017
@andrewrk andrewrk added this to the 0.1.0 milestone Mar 31, 2017
@thejoshwolfe
Copy link
Contributor Author

to follow up the issue in elf.zig mentioned above, it appears that io.InStream.close not longer returns an error, so that's fine.

but i did fix a bunch of other cases where this problem was happening, mostly by assigning to _.

thejoshwolfe added a commit that referenced this issue Apr 24, 2017
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