diff options
author | Thomas Lively <7121787+tlively@users.noreply.github.com> | 2022-02-18 10:08:13 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-18 10:08:13 -0800 |
commit | 11ada63fbb7ba982c92f22fa1fb0e39cebe3f194 (patch) | |
tree | 07b49625c44cbca91db24da065b7003393ce7410 /test | |
parent | 6810b60d7281d3e847692fdfb06faf32c9a09e59 (diff) | |
download | binaryen-11ada63fbb7ba982c92f22fa1fb0e39cebe3f194.tar.gz binaryen-11ada63fbb7ba982c92f22fa1fb0e39cebe3f194.tar.bz2 binaryen-11ada63fbb7ba982c92f22fa1fb0e39cebe3f194.zip |
Include type names in error messages from building (#4517)
Instead of just reporting the type index that causes an error when building
types, report the name of the responsible type when parsing the text format.
Diffstat (limited to 'test')
-rw-r--r-- | test/lit/parse-bad-supertype.wast | 9 |
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 |