blob: a20088c6dc55ab1249284cbd5b17a037efe38bac (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
(module
(type $ft (func (param i32) (result i32)))
(type $ct (cont $ft))
(func $id (param $x (ref $ct)) (result (ref $ct))
(local.get $x)
)
(func $cont-nocont (param $x (ref null $ct))
(local $l1 (ref null cont))
(local $l2 (ref null $ct))
(local.set $l1 (local.get $x)) ;; $ct <: cont
(local.set $l2 (ref.null nocont)) ;; nocont <: $ct
(local.set $l1 (ref.null nocont)) ;; nocont <: cont
)
)
(assert_invalid
(module
(type $ft (func (param i32) (result i32)))
(type $ct1 (cont $ft))
(type $ct2 (cont $ct1))
)
"invalid"
)
(assert_invalid
(module
(type $ft (func (param i32) (result i32)))
(type $ct (cont $ft))
(func $id (param $x $ct) (result i32)
(i32.const 123)
)
)
"invalid"
)
(assert_invalid
(module
(type $ft (func (param i32) (result i32)))
(type $ct (cont $ft))
(func $id (type $ct)
(i32.const 123)
)
)
"invalid"
)
|