3 ms·
See my comment above, your example only "just works" if the enclosing function has the appropriate return type (in this case none). So the syntactic element "r
by derriz 1y ago
See my comment above, your example only "just works" if the enclosing function has the appropriate return type (in this case none).
So the syntactic element "return" is not just an expression - unlike other sub-expressions, it involves action at a distance - i.e. it must not just agree with it's context as part of an expression but it must agree with the enclosing fn signature.
- steveklabnik 1y agoI replied over there, let's keep it to that sub-tree so we both don't have to duplicate comments :)