Skip to content

Commit 2ea91ee

Browse files
authored
Remove tests related to refines (#604)
This was removed some time ago but wasm-tools forgot to catch up. Closes #603
1 parent 5e81b08 commit 2ea91ee

1 file changed

Lines changed: 2 additions & 41 deletions

File tree

test/wasm-tools/definedtypes.wast

Lines changed: 2 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@
2222

2323
(type $A15a (variant (case "x")))
2424
(type $A15b (variant (case "x" $A1)))
25-
(type $A15c (variant (case $x "x") (case $y "y" string (refines $x)) (case "z" string (refines $y))))
26-
(type $A15d (variant (case "x") (case "y" string (refines 0)) (case "z" string (refines 1))))
25+
(type $A15c (variant (case $x "x") (case $y "y" string) (case "z" string)))
26+
(type $A15d (variant (case "x") (case "y" string) (case "z" string)))
2727

2828
(type $A16a (list (tuple u8)))
2929
(type $A16b (list $A3))
@@ -44,45 +44,6 @@
4444
(type $A22d (result $A9 (error $A10a)))
4545
)
4646

47-
(assert_malformed
48-
(component quote
49-
"(type $t (variant (case $x \"x\" string (refines $x))))"
50-
)
51-
"variant case cannot refine itself"
52-
)
53-
54-
(assert_malformed
55-
(component quote
56-
"(type $t (variant (case \"x\" (refines $y)) (case $y \"y\" string)))"
57-
)
58-
"unknown variant case"
59-
)
60-
61-
(assert_malformed
62-
(component quote
63-
"(type $t string)"
64-
"(type $v (variant (case \"x\" $t (refines $z))))"
65-
)
66-
"unknown variant case"
67-
)
68-
69-
70-
(assert_invalid
71-
(component
72-
(type $t string)
73-
(type $v (variant (case "x" $t (refines 1))))
74-
)
75-
"variant case can only refine a previously defined case"
76-
)
77-
78-
(assert_invalid
79-
(component
80-
(type $t string)
81-
(type $v (variant (case "x" $t) (case "y" u64 (refines 2)) (case "z" string)))
82-
)
83-
"variant case can only refine a previously defined case"
84-
)
85-
8647
(assert_malformed
8748
(component quote
8849
"(type $t string)"

0 commit comments

Comments
 (0)