@@ -682,12 +682,12 @@ declarators to be used by subsequent declarators in the type:
682
682
``` wasm
683
683
(component
684
684
(import "fancy-fs" (instance $fancy-fs
685
- (export "fs" (instance $fs
686
- (export "file" (type $file (sub resource)))
687
- ...
685
+ (export $fs "fs" (instance
686
+ (export "file" (type (sub resource)))
687
+ ;; ...
688
688
))
689
689
(alias export $fs "file" (type $file))
690
- (export "fancy-op" (func (param (borrow $file))))
690
+ (export "fancy-op" (func (param "f" (borrow $file))))
691
691
))
692
692
)
693
693
```
@@ -702,19 +702,19 @@ definitions:
702
702
(component $C
703
703
(type $T (list (tuple string bool)))
704
704
(type $U (option $T))
705
- (type $G (func (param (list $T)) (result $U)))
705
+ (type $G (func (param "x" (list $T)) (result $U)))
706
706
(type $D (component
707
707
(alias outer $C $T (type $C_T))
708
708
(type $L (list $C_T))
709
- (import "f" (func (param $L) (result (list u8))))
709
+ (import "f" (func (param "x" $L) (result (list u8))))
710
710
(import "g" (func (type $G)))
711
- (export "g " (func (type $G)))
711
+ (export "g2 " (func (type $G)))
712
712
(export "h" (func (result $U)))
713
713
(import "T" (type $T (sub resource)))
714
- (import "i" (func (param (list (own $T)))))
715
- (export "T" (type $T' (eq $T)))
716
- (export "U" (type $U (sub resource)))
717
- (export "j" (func (param (borrow $T')) (result (own $U))))
714
+ (import "i" (func (param "x" (list (own $T)))))
715
+ (export $T' "T2" (type (eq $T)))
716
+ (export $U' "U" (type (sub resource)))
717
+ (export "j" (func (param "x" (borrow $T')) (result (own $U' ))))
718
718
))
719
719
)
720
720
```
@@ -829,10 +829,10 @@ the following component:
829
829
(component $C
830
830
(import "T1" (type $T1 (sub resource)))
831
831
(import "T2" (type $T2 (sub resource)))
832
- (import "T3" (type $T3 (eq $T2))
833
- (type $ListT1 (list $T1))
834
- (type $ListT2 (list $T2))
835
- (type $ListT3 (list $T3))
832
+ (import "T3" (type $T3 (eq $T2)))
833
+ (type $ListT1 (list (own $T1) ))
834
+ (type $ListT2 (list (own $T2) ))
835
+ (type $ListT3 (list (own $T3) ))
836
836
)
837
837
```
838
838
the types ` $T2 ` and ` $T3 ` are equal to each other but not to ` $T1 ` . By the
@@ -873,14 +873,14 @@ as well. For example, in this component:
873
873
``` wasm
874
874
(component
875
875
(import "C" (component $C
876
- (export "T1" (type $T1 (sub resource)))
877
- (export "T2" (type $T2 (sub resource)))
878
- (export "T3" (type $T3 (eq $T2)))
876
+ (export "T1" (type (sub resource)))
877
+ (export $T2 "T2" (type (sub resource)))
878
+ (export "T3" (type (eq $T2)))
879
879
))
880
880
(instance $c (instantiate $C))
881
- (type $T1 ( alias export $i "T1"))
882
- (type $T2 ( alias export $i "T2"))
883
- (type $T3 ( alias export $i "T3"))
881
+ (alias export $c "T1" (type $T1 ))
882
+ (alias export $c "T2" (type $T2 ))
883
+ (alias export $c "T3" (type $T3 ))
884
884
)
885
885
```
886
886
the types ` $T2 ` and ` $T3 ` are equal to each other but not to ` $T1 ` . These
@@ -961,6 +961,7 @@ following component:
961
961
(type $r (resource (rep i32)))
962
962
(export $r1 "r1" (type $r))
963
963
(export "r2" (type $r1))
964
+ )
964
965
```
965
966
is assigned the following ` componenttype ` :
966
967
``` wasm
0 commit comments