-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Stage2 compile error improvements #12016
Conversation
25beac6
to
77416c4
Compare
// :2:20: error: expected error set type, found 'u8' | ||
// :6:31: error: expected error set type, found 'u16' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We seem to have lost the handy note:
note: `||` merges error sets; `or` performs boolean OR
this is beneficial because ||
in other languages is or
.
I haven't been checking too closely on your other commits, have you been making sure that useful error notes are preserved when marking these test cases as "passing" for stage2?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This note is still there but only when both operands are bools.
77416c4
to
5007f72
Compare
can you explain more why this change? |
I'm going to merge because I trust your judgement and these are some really nice improvements. We can chat about |
It is to stop users from doing comptime logic on the line number and then moving the function during an incremental update, it was discussed in the original proposal #2029 (comment). test {
if (@src().line == 4) @compileError("don't put me on line 4");
} The alternative is to make all the fields comptime known but then invalidate the function if it is moved. |
Stage2 compile error improvements
No description provided.