Skip to content

Conversation

ReneSac
Copy link
Contributor

@ReneSac ReneSac commented Mar 6, 2014

As discussed on IRC.

Araq added a commit that referenced this pull request Mar 6, 2014
Added comment explaining 'assert_numbits' error.
@Araq Araq merged commit 53ebe76 into nim-lang:devel Mar 6, 2014
Araq added a commit that referenced this pull request Apr 7, 2014
Added comment explaining 'assert_numbits' error.
Clyybber pushed a commit to Clyybber/Nim that referenced this pull request Oct 20, 2023
## Summary

Fix generic parameter symbols not being resolved in forwarded generic
routines that are instantiated before the generic routine is completed.
This led to overload resolution failures or internal compiler errors.

## Details

Instantiations created of a forwarded generic routines prior to the
body existing are incomplete and need to be fixed-up once the body is
available. This is done by `fixupInstantiatedSymbols`, but the
instantiated generic parameters weren't added to the scope, which meant
that the non-instantiated ones previously added to the scope by
`semProcAux` were used.

The symbols aren't persisted in the `TInstantiation`, only the types
are, so they need to be created again. The logic for doing so is split
out from `instantiateGenericParamList` into the standalone
`instantiateGenericParam`, which `fixupInstantiatedSymbols` then uses
to create the instantiated generic parameter symbols to add to the
scope.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants