Skip to content

Commit c17cf17

Browse files
authored
Disallow (borrow $t) in function result types (#1162)
This is something I forgot to implement in the intial implementation of resources. Validation in the component model dictates that `(borrow $t)` cannot be returned at this time, however, so this implements the necessary validation for this predicate. This commit modifies the calculation of a type's size to instead calculate a `TypeInfo` where that embeds both the size and borrow-related information. A check when translating function types is then added to ensure that all function result types do not contain borrows.
1 parent 9fb2019 commit c17cf17

File tree

4 files changed

+219
-114
lines changed

4 files changed

+219
-114
lines changed

0 commit comments

Comments
 (0)