mirror of
https://github.com/ziglang/zig.git
synced 2026-10-14 10:27:43 -04:00
1 parent
9a52abf3b4
commit
ce95cc170b
2 files changed
+14
No files matched your search
@@ -20,3 +20,14 @@ test "@src" {
|
||||
|
||||
try doTheTest();
|
||||
}
|
||||
|
||||
test "@src used as a comptime parameter" {
|
||||
const S = struct {
|
||||
fn Foo(comptime _: std.builtin.SourceLocation) type {
|
||||
return struct {};
|
||||
}
|
||||
};
|
||||
const T1 = S.Foo(@src());
|
||||
const T2 = S.Foo(@src());
|
||||
try expect(T1 != T2);
|
||||
}
|
||||
Reference in new issue
Block a user