mirror of
https://github.com/ziglang/zig.git
synced 2025-12-16 19:23:08 +00:00
parent
bd13e757e7
commit
76c8efd56c
@ -1,6 +1,15 @@
|
|||||||
const tests = @import("tests.zig");
|
const tests = @import("tests.zig");
|
||||||
|
|
||||||
pub fn addCases(cases: *tests.CompileErrorContext) void {
|
pub fn addCases(cases: *tests.CompileErrorContext) void {
|
||||||
|
cases.add(
|
||||||
|
"attempted implicit cast from T to [*]const T",
|
||||||
|
\\export fn entry() void {
|
||||||
|
\\ const x: [*]const bool = true;
|
||||||
|
\\}
|
||||||
|
,
|
||||||
|
".tmp_source.zig:2:30: error: expected type '[*]const bool', found 'bool'",
|
||||||
|
);
|
||||||
|
|
||||||
cases.add(
|
cases.add(
|
||||||
"dereference unknown length pointer",
|
"dereference unknown length pointer",
|
||||||
\\export fn entry(x: [*]i32) i32 {
|
\\export fn entry(x: [*]i32) i32 {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user