Correctly hash inferred types (#8286)

We don't really want to hash the tyInferred container since that'd make
the "real" type and its inferred counterpart produce different hashes
and types for the very same type.

Fixes #8280
This commit is contained in:
LemonBoy 2018-07-12 13:00:11 +02:00 • committed by Andreas Rumpf
commit ba1f036a56
2 changed files with 17 additions and 1 deletions

16
tests/concepts/t8280.nim Normal file
View file

@ -0,0 +1,16 @@
discard """
output: "()"
"""
type
Iterable[T] = concept x
for elem in x:
elem is T
proc max[A](iter: Iterable[A]): A =
discard
type
MyType = object
echo max(@[MyType()])