mirror of
https://github.com/ziglang/zig.git
synced 2026-10-14 10:27:43 -04:00
1 parent
773b1c4c5c
commit
9d9815fb9c
2 files changed
+21
No files matched your search
@@ -32,3 +32,14 @@ test "@src used as a comptime parameter" {
|
||||
const T2 = S.Foo(@src());
|
||||
try expect(T1 != T2);
|
||||
}
|
||||
|
||||
test "@src in tuple passed to anytype function" {
|
||||
const S = struct {
|
||||
fn Foo(a: anytype) u32 {
|
||||
return a[0].line;
|
||||
}
|
||||
};
|
||||
const l1 = S.Foo(.{@src()});
|
||||
const l2 = S.Foo(.{@src()});
|
||||
try expect(l1 != l2);
|
||||
}
|
||||
Reference in new issue
Block a user