diff options
| author | Andrew Kelley <superjoe30@gmail.com> | 2018-07-20 01:46:49 -0400 |
|---|---|---|
| committer | Andrew Kelley <superjoe30@gmail.com> | 2018-07-20 01:46:49 -0400 |
| commit | f5a67dba08b81c7109c52f6ad957aefdd646b56e (patch) | |
| tree | fa89431ab0e1c1149ff86cde8ab6c4aff1c79dcb /test/stage2 | |
| parent | 33fbd8c1d333922efa696b5b9384859a2664f8de (diff) | |
| download | zig-f5a67dba08b81c7109c52f6ad957aefdd646b56e.tar.gz zig-f5a67dba08b81c7109c52f6ad957aefdd646b56e.zip | |
self-hosted: implicit cast comptime ints to other ints
we now have successful exit codes from main linking
against libc
Diffstat (limited to 'test/stage2')
| -rw-r--r-- | test/stage2/compile_errors.zig | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/stage2/compile_errors.zig b/test/stage2/compile_errors.zig index d360c07b28..2cecd78653 100644 --- a/test/stage2/compile_errors.zig +++ b/test/stage2/compile_errors.zig @@ -21,4 +21,10 @@ pub fn addCases(ctx: *TestContext) !void { \\ defer return; \\} , "1.zig", 2, 11, "cannot return from defer expression"); + + try ctx.testCompileError( + \\export fn entry() c_int { + \\ return 36893488147419103232; + \\} + , "1.zig", 2, 12, "integer value '36893488147419103232' cannot be stored in type 'c_int'"); } |
