summaryrefslogtreecommitdiff
path: root/test/initializer.myr
diff options
context:
space:
mode:
Diffstat (limited to 'test/initializer.myr')
-rw-r--r--test/initializer.myr18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/initializer.myr b/test/initializer.myr
new file mode 100644
index 0000000..7f18806
--- /dev/null
+++ b/test/initializer.myr
@@ -0,0 +1,18 @@
+use std
+
+pkg =
+ type qid = struct
+ ty : uint8
+ path : uint64
+ ;;
+
+ type stat = struct
+ dev : uint32
+ qid : qid
+ ;;
+;;
+
+const main = {
+ var stat : stat = [.dev=0, .qid=[.ty=0, .path=0]]
+ std.assert(stat.qid.path == 0, "fail\n")
+}