From 9d9815fb9c21c91df41422ff582402fb56029328 Mon Sep 17 00:00:00 2001 From: Veikka Tuominen Date: Mon, 20 Mar 2023 18:30:33 +0200 Subject: Value: handle comparisons of runtime_values Closes #15004 --- test/behavior/src.zig | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'test/behavior/src.zig') 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); +} -- cgit v1.2.3