mirror of
https://github.com/ziglang/zig.git
synced 2025-12-28 17:13:19 +00:00
19 lines
354 B
Zig
19 lines
354 B
Zig
const std = @import("std");
|
|
const builtin = @import("builtin");
|
|
|
|
inline fn foo(comptime T: type) !T {
|
|
return error.AnError;
|
|
}
|
|
|
|
fn main0() !void {
|
|
_ = try foo(u8);
|
|
}
|
|
|
|
test "issue12644" {
|
|
if (builtin.zig_backend == .stage2_spirv64) return error.SkipZigTest;
|
|
|
|
main0() catch |e| {
|
|
try std.testing.expect(e == error.AnError);
|
|
};
|
|
}
|