Skip to content

Commit 31a9a37

Browse files
committed
feat: restrict the usage of any in return types
any must not be used as the return type of a function
1 parent d01089b commit 31a9a37

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

site/docs/extensions/index.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,8 @@ scalar_functions:
129129
```
130130
The `any[\d]` types (i.e. `any1`, `any2`, ..., `any9`) impose an additional restriction. Within a single function invocation, all any types with same numeric suffix _must_ be of the same type. In the `bar` function above, arguments `a` and `b` can have any type as long as both types are the same.
131131

132+
`any` may not be used as the return type for a function. An `any[\d]` type _may_ be used as a return type as long as it is also used for at least one function argument.
133+
132134

133135
## Advanced Extensions
134136

0 commit comments

Comments
 (0)