@@ -2573,15 +2573,6 @@ pub fn addCases(cases: *tests.CompileErrorContext) void {
|
||||
break :x tc;
|
||||
});
|
||||
|
||||
cases.add(
|
||||
"pass non-copyable type by value to function",
|
||||
\\const Point = struct { x: i32, y: i32, };
|
||||
\\fn foo(p: Point) void { }
|
||||
\\export fn entry() usize { return @sizeOf(@typeOf(foo)); }
|
||||
,
|
||||
".tmp_source.zig:2:11: error: type 'Point' is not copyable; cannot pass by value",
|
||||
);
|
||||
|
||||
cases.add(
|
||||
"implicit cast from array to mutable slice",
|
||||
\\var global_array: [10]i32 = undefined;
|
||||
@@ -4066,20 +4057,6 @@ pub fn addCases(cases: *tests.CompileErrorContext) void {
|
||||
".tmp_source.zig:3:5: note: field 'A' has type 'i32'",
|
||||
);
|
||||
|
||||
cases.add(
|
||||
"self-referencing function pointer field",
|
||||
\\const S = struct {
|
||||
\\ f: fn(_: S) void,
|
||||
\\};
|
||||
\\fn f(_: S) void {
|
||||
\\}
|
||||
\\export fn entry() void {
|
||||
\\ var _ = S { .f = f };
|
||||
\\}
|
||||
,
|
||||
".tmp_source.zig:4:9: error: type 'S' is not copyable; cannot pass by value",
|
||||
);
|
||||
|
||||
cases.add(
|
||||
"taking offset of void field in struct",
|
||||
\\const Empty = struct {
|
||||
|
||||
Reference in New Issue
Block a user