summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/lit/parse-bad-supertype.wast9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/lit/parse-bad-supertype.wast b/test/lit/parse-bad-supertype.wast
new file mode 100644
index 000000000..3a50efecf
--- /dev/null
+++ b/test/lit/parse-bad-supertype.wast
@@ -0,0 +1,9 @@
+;; Test that an invalid supertype results in a useful error message
+
+;; RUN: not wasm-opt %s -all --nominal 2>&1 | filecheck %s
+
+;; CHECK: Fatal: Invalid type: Heap type has an invalid supertype at type $sub
+(module
+ (type $super (struct_subtype i32 data))
+ (type $sub (struct_subtype i64 $super))
+) \ No newline at end of file