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

Fix segmentation fault on invalid enum field #1147

Closed
wants to merge 1 commit into from

Conversation

isaachier
Copy link
Contributor

Fixes #1079. Would add a test case, but not sure how to test that the compiler errors without a segfault.

@andrewrk
Copy link
Member

You can add compile error tests in test/compile_errors.zig then run

make install && bin/zig build --build-file ../build.zig test-compile-errors

Feel free to put your new test at the top, so it runs first.

@andrewrk
Copy link
Member

I'm not convinced this is the best solution though. Let me take a look.

@isaachier
Copy link
Contributor Author

Sure. Keep in mind the example in #1079 is intentionally malformed. But I'm guessing you already knew that :).

andrewrk added a commit that referenced this pull request Jun 21, 2018
@isaachier
Copy link
Contributor Author

Withdrawn. Glad you found a solution.

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.

None yet

2 participants