aboutsummaryrefslogtreecommitdiff
path: root/test/behavior/type.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2022-03-14 23:15:01 -0700
committerAndrew Kelley <andrew@ziglang.org>2022-03-14 23:15:01 -0700
commitc64279b15b527749420e0e79fcc6dbfbfeb02812 (patch)
tree8f7fe813a6b2b7048468731f5f93619b3704e882 /test/behavior/type.zig
parent1adb15098c711973d1c75061f122b907aaf09a7c (diff)
downloadzig-c64279b15b527749420e0e79fcc6dbfbfeb02812.tar.gz
zig-c64279b15b527749420e0e79fcc6dbfbfeb02812.zip
Sema: fix shl_sat with comptime rhs
Diffstat (limited to 'test/behavior/type.zig')
-rw-r--r--test/behavior/type.zig41
1 files changed, 4 insertions, 37 deletions
diff --git a/test/behavior/type.zig b/test/behavior/type.zig
index 0335bd3589..9d236071f2 100644
--- a/test/behavior/type.zig
+++ b/test/behavior/type.zig
@@ -230,7 +230,10 @@ test "Type.Vector" {
}
test "Type.AnyFrame" {
- if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO
+ if (builtin.zig_backend != .stage1) {
+ // https://github.com/ziglang/zig/issues/6025
+ return error.SkipZigTest;
+ }
try testTypes(&[_]type{
anyframe,
@@ -514,39 +517,3 @@ test "Type.Union from regular enum" {
_ = T;
_ = @typeInfo(T).Union;
}
-
-test "Type.Fn" {
- if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO
-
- // wasm doesn't support align attributes on functions
- if (builtin.target.cpu.arch == .wasm32 or builtin.target.cpu.arch == .wasm64) return error.SkipZigTest;
-
- const foo = struct {
- fn func(a: usize, b: bool) align(4) callconv(.C) usize {
- _ = a;
- _ = b;
- return 0;
- }
- }.func;
- const Foo = @Type(@typeInfo(@TypeOf(foo)));
- const foo_2: Foo = foo;
- _ = foo_2;
-}
-
-test "Type.BoundFn" {
- if (builtin.zig_backend != .stage1) return error.SkipZigTest; // TODO
-
- // wasm doesn't support align attributes on functions
- if (builtin.target.cpu.arch == .wasm32 or builtin.target.cpu.arch == .wasm64) return error.SkipZigTest;
-
- const TestStruct = packed struct {
- pub fn foo(self: *const @This()) align(4) callconv(.Unspecified) void {
- _ = self;
- }
- };
- const test_instance: TestStruct = undefined;
- try testing.expect(std.meta.eql(
- @typeName(@TypeOf(test_instance.foo)),
- @typeName(@Type(@typeInfo(@TypeOf(test_instance.foo)))),
- ));
-}