Closed daniel-j closed 1 week ago
Culprit is #23188, we check for generic parameters that are instantiated with unresolved statics, but in this case the parameter getting instantiated is only matching that it is int
, not the actual static value. I am hoping that checking that the matched type is tyStatic
is enough to deal with this.
Description
When using a static parameter as right hand side argument to a function like
shl
(which takes a SomeInteger as 2nd argument) the Nim compiler throws an error. This is a regression I noticed when upgrading to Nim 2.0.6.Test code:
Nim Version
Nim Compiler Version 2.0.6 [Linux: amd64] Compiled at 2024-06-17 Copyright (c) 2006-2023 by Andreas Rumpf
git hash: c00e8e71e0c8465b5a5257c76c674b803273b222 active boot switches: -d:release
Current Output
Expected Output
Possible Solution
No response
Additional Information
No response