@@ -837,23 +837,33 @@ the types `$T2` and `$T3` are equal to each other but not to `$T1`. By the
837
837
above transitive structural equality rules, the types ` $List2 ` and ` $List3 ` are
838
838
equal to each other but not to ` $List1 ` .
839
839
840
- Handle types (` own ` and ` borrow ` ) are purely structural, but, since they refer
841
- to resource types, transitively "inherit" the freshness of abstract resource
842
- types. For example, in the following component:
840
+ Handle types (` own ` and ` borrow ` ) are structural types (like ` list ` ) but, since
841
+ they refer to resource types, transitively "inherit" the freshness of abstract
842
+ resource types. For example, in the following component:
843
843
``` wasm
844
844
(component
845
845
(import "T" (type $T (sub resource)))
846
846
(import "U" (type $U (sub resource)))
847
- (type $Handle1 (own $T))
848
- (type $Handle2 (own $T))
849
- (type $Handle3 (own $U))
847
+ (type $Own1 (own $T))
848
+ (type $Own2 (own $T))
849
+ (type $Own3 (own $U))
850
+ (type $ListOwn1 (list $Own1))
851
+ (type $ListOwn2 (list $Own2))
852
+ (type $ListOwn3 (list $Own3))
853
+ (type $Borrow1 (borrow $T))
854
+ (type $Borrow2 (borrow $T))
855
+ (type $Borrow3 (borrow $U))
856
+ (type $ListBorrow1 (list $Borrow1))
857
+ (type $ListBorrow2 (list $Borrow2))
858
+ (type $ListBorrow3 (list $Borrow3))
850
859
)
851
860
```
852
- the types ` $Handle1 ` and ` $Handle2 ` are equal to each other but not to
853
- ` $Handle3 ` . Transitively, any types containing ` $Handle1 ` or ` $Handle2 ` are
854
- equal, such as a ` (list $Handle1) ` and ` (list $Handle2) ` or function types
855
- using handles in their parameters and results. These type-checking rules for
856
- type imports mirror the * introduction* rule of [ universal types] (∀T).
861
+ the types ` $Own1 ` and ` $Own2 ` are equal to each other but not to ` $Own3 ` or
862
+ any of the ` $Borrow* ` . Similarly, ` $Borrow1 ` and ` $Borrow2 ` are equal to
863
+ each other but not ` $Borrow3 ` . Transitively, the types ` $ListOwn1 ` and
864
+ ` $ListOwn2 ` are equal to each other but not ` $ListOwn3 ` or any of the
865
+ ` $ListBorrow* ` . These type-checking rules for type imports mirror the
866
+ * introduction* rule of [ universal types] (∀T).
857
867
858
868
The above examples all show abstract types in terms of * imports* , but the same
859
869
"freshness" condition applies when aliasing the * exports* of another component
0 commit comments