-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
internal: improve
tryGenerateInstance
(#858)
## Summary Replace the meta-type instantiation plus subsequent test for whether the resulting type is still generic with directly testing for whether the to-be-instantiated type contains unbound type variables. Apart from being more efficient, this also allows for removing the now- unused `prepareMetatypeForSigmatch` procedure, which is a step towards removing the "meta-types allowed" mode from `semtypinst`. ## Details Compared to `containsGenericType`, the new `containsUnresolvedTypeVar` looks for unbound type variables instead of for generic types. This slightly changes the meaning of `tryGenerateInstance` from "produces non-meta, concrete type on success" to "produces concrete type on success". However, since the single usage-site of `tryGenerateInstance` (`procParamTypeRel`) already tests for meta types being returned, no additional adjustment is required.
- Loading branch information
Showing
1 changed file
with
56 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters