From ba1f036a56362885d543f470642230de40df217d Mon Sep 17 00:00:00 2001 From: LemonBoy Date: Thu, 12 Jul 2018 13:00:11 +0200 Subject: 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 --- tests/concepts/t8280.nim | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 tests/concepts/t8280.nim (limited to 'tests/concepts') diff --git a/tests/concepts/t8280.nim b/tests/concepts/t8280.nim new file mode 100644 index 000000000..ba33af34e --- /dev/null +++ b/tests/concepts/t8280.nim @@ -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()]) -- cgit 1.4.1-2-gfad0