summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/wasm/gc/supertype_later_in_group.js
blob: 6f5ce48282f40dfb95d601894caf05856345d435 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// |jit-test| skip-if: !wasmGcEnabled()

// Checking that we are correctly validating all subtyping rules.
// In this example, $b should be a subtype of $a, even if their field types
// will be loaded later.
wasmValidateText(`
(module
    (rec
        (type $a (struct (field (ref $notParsedYet))))
        (type $b (sub $a (struct (field (ref $notParsedYet2)))))

        (type $notParsedYet (struct))
        (type $notParsedYet2 (sub $notParsedYet (struct (field i32))))
    )
)`);