Nim icon indicating copy to clipboard operation
Nim copied to clipboard

fix calls to implicitly generic params in generic contexts

Open metagn opened this issue 1 year ago • 1 comments

There were a couple remaining bugs after #24005, #24065 for proc parameters with implicit generic types:

  • A new check containsUnresolvedType was introduced that purposefully excluded typeclasses, but implicitly generic proc params can have typeclass type annotated with tfImplicitTypeParam. To fix this, we include tfImplicitTypeParam and tfGenericTypeParam into the flags that are considered unresolved (previously only tfUnresolved).
  • x is T where x has an unresolved type only delayed evaluation if x was a type itself, i.e. it didn't work properly if x is a regular value. This is now fixed by performing the same check for both non-typedesc types and typedesc types.

metagn avatar Oct 05 '24 22:10 metagn