summary refs log tree commit diff stats
path: root/tests/generics/tgensyminst.nim
Commit message (Collapse)AuthorAgeFilesLines
* fix segfault with gensym node instantiation (#24050)metagn2024-09-031-0/+29
fixes #24048 Generic lambdas get instantiated via `replaceTypesInBody` which calls `replaceTypeVarsN` on the body of the lambda. This body can contain sym nodes of gensym symbols generated by macros, which have `nil` type. But a piece of code in `replaceTypeVarsN` checks whether the type of a symbol is equal to `void` without checking if it's `nil` first, which causes a segfault. Now it also checks that the type of the symbol isn't `nil` for it to be `void`.