From febc7d3cd63eefe91c7aaa95e3a274a0b44e353e Mon Sep 17 00:00:00 2001 From: Veikka Tuominen Date: Tue, 31 May 2022 16:21:36 +0300 Subject: Sema: take `dbg_stmt` into account in `zirResolveInferredAlloc` --- test/behavior/basic.zig | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'test/behavior/basic.zig') diff --git a/test/behavior/basic.zig b/test/behavior/basic.zig index e887a1d4b6..8bc1ad5cf2 100644 --- a/test/behavior/basic.zig +++ b/test/behavior/basic.zig @@ -977,3 +977,13 @@ test "weird array and tuple initializations" { .b = if (a) .{ .e = .a } else .{ .e = .b }, }; } + +test "array type comes from generic function" { + const S = struct { + fn A() type { + return struct { a: u8 = 0 }; + } + }; + const args = [_]S.A(){.{}}; + _ = args; +} -- cgit v1.2.3