Nim
Nim copied to clipboard
fix calls to implicitly generic params in generic contexts
There were a couple remaining bugs after #24005, #24065 for proc parameters with implicit generic types:
- A new check
containsUnresolvedTypewas introduced that purposefully excluded typeclasses, but implicitly generic proc params can have typeclass type annotated withtfImplicitTypeParam. To fix this, we includetfImplicitTypeParamandtfGenericTypeParaminto the flags that are considered unresolved (previously onlytfUnresolved). x is Twherexhas an unresolved type only delayed evaluation ifxwas a type itself, i.e. it didn't work properly ifxis a regular value. This is now fixed by performing the same check for both non-typedesc types and typedesc types.