add compiler note for bad int coercion

closes #3724
This commit is contained in:
Andrew Kelley
2019-11-26 19:50:52 -05:00
parent a6ef83cccf
commit 8ecd6c4d8c
2 changed files with 28 additions and 0 deletions

View File

@@ -1648,6 +1648,7 @@ pub fn addCases(cases: *tests.CompileErrorContext) void {
"tmp.zig:3:31: error: integer value 300 cannot be coerced to type 'u8'",
"tmp.zig:7:22: error: integer value 300 cannot be coerced to type 'u8'",
"tmp.zig:11:20: error: expected type 'u8', found 'u16'",
"tmp.zig:11:20: note: unsigned 8-bit int cannot represent all possible unsigned 16-bit values",
);
cases.add(