diff options
author | metagn <metagngn@gmail.com> | 2024-09-11 17:13:28 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-11 16:13:28 +0200 |
commit | 793cee4de1934fd1f6271cf5fed46f01c5abb19b (patch) | |
tree | b4ac74288c31921f57bbd8fcea00a89b8ed27020 /compiler/commands.nim | |
parent | 9dda7ff7bccec58937be450564f55d308fb2b07e (diff) | |
download | Nim-793cee4de1934fd1f6271cf5fed46f01c5abb19b.tar.gz |
treat generic body type as atomic in iterOverType (#24096)
follows up #24095 In #24095 a check was added that used `iterOverType` to check if a type contained unresolved types, with the aim of always treating `tyGenericBody` as resolved. But the body of the `tyGenericBody` is also iterated over in `iterOverType`, so if the body of the type actually used generic parameters (which isn't the case in the test added in #24095, but is now), the check would still count the type as unresolved. This is handled by not iterating over the children of `tyGenericBody`, the only users of `iterOverType` are `containsGenericType` and `containsUnresolvedType`, the first one always returns true for `tyGenericBody` and the second one aims to always return false. Unfortunately this means `iterOverType` isn't as generic of an API anymore but maybe it shouldn't be used anymore for these procs.
Diffstat (limited to 'compiler/commands.nim')
0 files changed, 0 insertions, 0 deletions