all integer sizes are available as primitives

* fix wrong implicit cast for `@IntType` bit_count parameter.
 * fix incorrect docs for `@IntType` bit_count parameter.

closes #1242
closes #745
closes #1240
This commit is contained in:
Andrew Kelley
2018-07-16 10:53:15 -04:00
parent 363f4facea
commit e9a03cccf3
17 changed files with 74 additions and 104 deletions

View File

@@ -1,6 +1,15 @@
const tests = @import("tests.zig");
pub fn addCases(cases: *tests.CompileErrorContext) void {
cases.add(
"optional pointer to void in extern struct",
\\comptime {
\\ _ = @IntType(false, @maxValue(u32) + 1);
\\}
,
".tmp_source.zig:2:40: error: integer value 4294967296 cannot be implicitly casted to type 'u32'",
);
cases.add(
"optional pointer to void in extern struct",
\\const Foo = extern struct {