mirror of
https://github.com/fluencelabs/wasm-bindgen
synced 2025-07-30 19:41:56 +00:00
Fix a bug in coalescing types with GC
When a duplicate type is found is should no longer be considered used!
This commit is contained in:
34
crates/gc/tests/wat/remove-unused-type.wat
Normal file
34
crates/gc/tests/wat/remove-unused-type.wat
Normal file
@@ -0,0 +1,34 @@
|
||||
(module
|
||||
(type (func))
|
||||
(type (func (param i32)))
|
||||
(type (func (param i32)))
|
||||
(type (func (result i32)))
|
||||
|
||||
(func $f1 (type 0))
|
||||
(func $f2 (type 1))
|
||||
(func $f3 (type 2))
|
||||
(func $f4 (type 3)
|
||||
i32.const 0
|
||||
)
|
||||
|
||||
(export "a" (func $f1))
|
||||
(export "b" (func $f2))
|
||||
(export "c" (func $f3))
|
||||
(export "d" (func $f4))
|
||||
)
|
||||
|
||||
;; STDOUT (update this section with `BLESS_TESTS=1` while running tests)
|
||||
;; (module
|
||||
;; (type (;0;) (func))
|
||||
;; (type (;1;) (func (param i32)))
|
||||
;; (type (;2;) (func (result i32)))
|
||||
;; (func $f1 (type 0))
|
||||
;; (func $f2 (type 1) (param i32))
|
||||
;; (func $f3 (type 1) (param i32))
|
||||
;; (func $f4 (type 2) (result i32)
|
||||
;; i32.const 0)
|
||||
;; (export "a" (func $f1))
|
||||
;; (export "b" (func $f2))
|
||||
;; (export "c" (func $f3))
|
||||
;; (export "d" (func $f4)))
|
||||
;; STDOUT
|
Reference in New Issue
Block a user