Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
templates/macros use no expected types when return types are specified (
#24298) fixes #24296 fixes #24295 Templates use `expectedType` for type inference. It's justified that when templates don't have an actual return type, i.e., `untyped` etc. When the return type of templates is specified, we should not infer the type ```nim template g(): string = "" let c: cstring = g() ``` In this example, it is not reasonable to annotate the templates expression with the `cstring` type before the `fitNode` check with its specified return type. (cherry picked from commit 80e6b35)
- Loading branch information