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:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user