aboutsummaryrefslogtreecommitdiff
path: root/test/behavior/misc.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2021-12-27 19:39:28 -0700
committerAndrew Kelley <andrew@ziglang.org>2021-12-27 19:39:28 -0700
commit6ed7850972c5d74912e6802474564de332ecf0d9 (patch)
tree21f6e28332d2abeaebbf75088a4b8af6542c72f7 /test/behavior/misc.zig
parentfc1a5cd9e74faf19e5974c733b0bcd9444d48b7b (diff)
downloadzig-6ed7850972c5d74912e6802474564de332ecf0d9.tar.gz
zig-6ed7850972c5d74912e6802474564de332ecf0d9.zip
Sema: fix anytype parameters whose types require comptime
Diffstat (limited to 'test/behavior/misc.zig')
-rw-r--r--test/behavior/misc.zig38
1 files changed, 0 insertions, 38 deletions
diff --git a/test/behavior/misc.zig b/test/behavior/misc.zig
index 7a248ed320..df435ac60c 100644
--- a/test/behavior/misc.zig
+++ b/test/behavior/misc.zig
@@ -34,44 +34,6 @@ test "explicit cast optional pointers" {
_ = b;
}
-test "constant enum initialization with differing sizes" {
- try test3_1(test3_foo);
- try test3_2(test3_bar);
-}
-const Test3Foo = union(enum) {
- One: void,
- Two: f32,
- Three: Test3Point,
-};
-const Test3Point = struct {
- x: i32,
- y: i32,
-};
-const test3_foo = Test3Foo{
- .Three = Test3Point{
- .x = 3,
- .y = 4,
- },
-};
-const test3_bar = Test3Foo{ .Two = 13 };
-fn test3_1(f: Test3Foo) !void {
- switch (f) {
- Test3Foo.Three => |pt| {
- try expect(pt.x == 3);
- try expect(pt.y == 4);
- },
- else => unreachable,
- }
-}
-fn test3_2(f: Test3Foo) !void {
- switch (f) {
- Test3Foo.Two => |x| {
- try expect(x == 13);
- },
- else => unreachable,
- }
-}
-
test "pointer comparison" {
const a = @as([]const u8, "a");
const b = &a;