mirror of
https://github.com/ziglang/zig.git
synced 2025-12-14 02:03:08 +00:00
16 lines
243 B
Zig
16 lines
243 B
Zig
const std = @import("std");
|
|
|
|
inline fn foo(comptime T: type) !T {
|
|
return error.AnError;
|
|
}
|
|
|
|
fn main0() !void {
|
|
_ = try foo(u8);
|
|
}
|
|
|
|
test "issue12644" {
|
|
main0() catch |e| {
|
|
try std.testing.expect(e == error.AnError);
|
|
};
|
|
}
|