Nim is a statically typed compiled systems programming language. It combines successful concepts from mature languages like Python, Ada and Modula. Its design focuses on efficiency, expressiveness, and elegance (in that order of priority).
Original PR is #23630 by @Nimaoth, could not personally commit the refactor to that PR so had to open this one branched off from it.
Symbols of generic parameters with static constraints can lose their tyGenericParam type in favor of the static type. This trips up the compiler, which expects only tyGenericParam, when attempting to instantiate the parameters of a tyGenericInvocation to look it up in the cache. To fix this, also consider the uninstantiated static case.
I don't know why only generic parameters are instantiated here and not any type before looking at the cache, will have to look into it after.
Edit: This breaks tmatrix4 but the original doesn't
Original PR is #23630 by @Nimaoth, could not personally commit the refactor to that PR so had to open this one branched off from it.
Symbols of generic parameters with
static
constraints can lose theirtyGenericParam
type in favor of thestatic
type. This trips up the compiler, which expects onlytyGenericParam
, when attempting to instantiate the parameters of atyGenericInvocation
to look it up in the cache. To fix this, also consider the uninstantiatedstatic
case.I don't know why only generic parameters are instantiated here and not any type before looking at the cache, will have to look into it after.
Edit: This breaks
tmatrix4
but the original doesn't