Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
refs #1107 (makes issue test case work but isn't a substitute for argument dependent lookup in general)
OchoiceX
when semchecked again (as is done for callee symbols in calls) now looks up the current context again for newly introduced symbols and adds them to the symchoice. This is not done in original Nim: instead of rewriting the symchoice node, open symchoices give new symbols during overload iteration. Doing it this way might unintentionally "accumulate" symbols after consecutive resems but I'm not sure that this would necessarily be a bad thing.To do it how original Nim does it, we can either only expand the symchoice if a callee semcheck flag is passed, or maybe
resolveOverloads
when iterating overOchoiceX
can also look up newly introduced symbols. But maybe these are not general enough.Worth noting that this is the first difference in behavior between
OchoiceX
andCchoiceX
in the codebase.