diff options
| author | Veikka Tuominen <git@vexu.eu> | 2023-03-20 18:30:33 +0200 |
|---|---|---|
| committer | Veikka Tuominen <git@vexu.eu> | 2023-03-21 00:34:12 +0200 |
| commit | 9d9815fb9c21c91df41422ff582402fb56029328 (patch) | |
| tree | 99e2d8801e308d6c76c3901180ca6783d2c2ad28 /test | |
| parent | 773b1c4c5cdf9fde19cbf09d0f81f1bfe27ed7ca (diff) | |
| download | zig-9d9815fb9c21c91df41422ff582402fb56029328.tar.gz zig-9d9815fb9c21c91df41422ff582402fb56029328.zip | |
Value: handle comparisons of runtime_values
Closes #15004
Diffstat (limited to 'test')
| -rw-r--r-- | test/behavior/src.zig | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/behavior/src.zig b/test/behavior/src.zig index 77e420afcf..e6b84e5d56 100644 --- a/test/behavior/src.zig +++ b/test/behavior/src.zig @@ -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); +} |
