Skip to content

Commit 768969c

Browse files
committed
add a test
1 parent 58ec930 commit 768969c

1 file changed

Lines changed: 17 additions & 0 deletions

File tree

test/lit/passes/dae-gc.wast

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -292,3 +292,20 @@
292292
)
293293
)
294294

295+
;; We do not refine the result if the type is final/closed, as we can't
296+
;; subtype it.
297+
(module
298+
;; CHECK: (type $func (func (result anyref)))
299+
(type $func (func (result anyref)))
300+
301+
;; CHECK: (type $A (struct))
302+
(type $A (struct))
303+
304+
;; CHECK: (func $export (type $func) (result anyref)
305+
;; CHECK-NEXT: (struct.new_default $A)
306+
;; CHECK-NEXT: )
307+
(func $export (export "export") (type $func) (result anyref)
308+
(struct.new $A)
309+
)
310+
)
311+

0 commit comments

Comments
 (0)