aboutsummaryrefslogtreecommitdiff
path: root/test/behavior
diff options
context:
space:
mode:
authorVeikka Tuominen <git@vexu.eu>2022-05-31 16:21:36 +0300
committerVeikka Tuominen <git@vexu.eu>2022-05-31 16:22:00 +0300
commitfebc7d3cd63eefe91c7aaa95e3a274a0b44e353e (patch)
tree67ef6d579402767c8c359fabd98f11026a03eac0 /test/behavior
parent83beed09e1ce5a15e2b9801a50cf601352d8383e (diff)
downloadzig-febc7d3cd63eefe91c7aaa95e3a274a0b44e353e.tar.gz
zig-febc7d3cd63eefe91c7aaa95e3a274a0b44e353e.zip
Sema: take `dbg_stmt` into account in `zirResolveInferredAlloc`
Diffstat (limited to 'test/behavior')
-rw-r--r--test/behavior/basic.zig10
1 files changed, 10 insertions, 0 deletions
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;
+}