Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
don't instantiate generic body type symbols in generic expressions (n…
…im-lang#24092) fixes nim-lang#24090 Generic body types are normally a sign of an uninstantiated type, and so give errors when trying to instantiate them. However when instantiating free user expressions like the nodes of `tyFromExpr`, generic default params, static values etc, they can be used as arguments to macros or templates etc (as in the issue). So, we don't try to instantiate generic body type symbols at all in free expressions such as these (but not in for example type nodes), and avoid the error. In the future there should be a "concrete type" check for generic body types different from the check in type instantiation to deal with things like nim-lang#24091, if we do want to allow this use of them.
- Loading branch information