summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/lit/validation/open-types-no-gc.wast13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/lit/validation/open-types-no-gc.wast b/test/lit/validation/open-types-no-gc.wast
new file mode 100644
index 000000000..189d4e464
--- /dev/null
+++ b/test/lit/validation/open-types-no-gc.wast
@@ -0,0 +1,13 @@
+;; Test that declaring non-final types without GC is a validation error.
+
+;; RUN: not wasm-opt %s -all --disable-gc 2>&1 | filecheck %s
+
+;; CHECK: all used types should be allowed
+
+(module
+ (type $f1 (sub (func)))
+
+ (func $test (type $f1)
+ (unreachable)
+ )
+) \ No newline at end of file