Skip to content

Commit ef5b07b

Browse files
committed
Test link-time tag typing
1 parent 43f84a3 commit ef5b07b

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

test/core/tag.wast

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,43 @@
1919
(module (tag (result i32)))
2020
"non-empty tag result type"
2121
)
22+
23+
24+
;; Link-time typing
25+
26+
(module
27+
(rec
28+
(type $t1 (func))
29+
(type $t2 (func))
30+
)
31+
(tag (export "tag") (type $t1))
32+
)
33+
34+
(register "M")
35+
36+
(module
37+
(rec
38+
(type $t1 (func))
39+
(type $t2 (func))
40+
)
41+
(tag (import "M" "tag") (type $t1))
42+
)
43+
44+
(assert_unlinkable
45+
(module
46+
(rec
47+
(type $t1 (func))
48+
(type $t2 (func))
49+
)
50+
(tag (import "M" "tag") (type $t2))
51+
)
52+
"incompatible import"
53+
)
54+
55+
(assert_unlinkable
56+
(module
57+
(type $t (func))
58+
(tag (import "M" "tag") (type $t))
59+
)
60+
"incompatible import"
61+
)

0 commit comments

Comments
 (0)