stage1: better error message when comparing against null

Closes: #2104
This commit is contained in:
Shawn Landden
2019-03-28 08:47:47 -05:00
committed by Andrew Kelley
parent 85d1885375
commit 66f13ba807
2 changed files with 3 additions and 2 deletions

View File

@@ -839,7 +839,7 @@ pub fn addCases(cases: *tests.CompileErrorContext) void {
\\ _ = &x == null;
\\}
,
"tmp.zig:3:12: error: comparison against null can only be done with optionals",
"tmp.zig:3:12: error: only optionals (not '*i32') can compare to null",
);
cases.add(