File tree Expand file tree Collapse file tree 1 file changed +36
-0
lines changed Expand file tree Collapse file tree 1 file changed +36
-0
lines changed Original file line number Diff line number Diff line change
1
+ ;; Syntax and Scoping
2
+
3
+ (module
4
+ (type (func (param (ref 0 )) (result (ref 0 ))))
5
+ (rec
6
+ (type (func (param (ref 2 ))))
7
+ (type (func (result (ref 1 ))))
8
+ )
9
+
10
+ (rec)
11
+ (rec (type (func )))
12
+ (rec (type $t (func )))
13
+ (rec (type $t1 (func )) (type (func )) (type $t2 (func )))
14
+ (rec (type $g (func (param (ref $g )) (result (ref $g )))))
15
+ (rec
16
+ (type $h (func (param (ref $k ))))
17
+ (type $k (func (result (ref $h ))))
18
+ )
19
+ )
20
+
21
+ (assert_invalid
22
+ (module
23
+ (type (func (param (ref 1 ))))
24
+ (type (func ))
25
+ )
26
+ " unknown type"
27
+ )
28
+ (assert_invalid
29
+ (module
30
+ (rec (type (func (param (ref 1 )))))
31
+ (rec (type (func )))
32
+ )
33
+ " unknown type"
34
+ )
35
+
36
+
1
37
;; Static matching of recursive types
2
38
3
39
(module
You can’t perform that action at this time.
0 commit comments