diff options
author | LemonBoy <LemonBoy@users.noreply.github.com> | 2018-07-12 13:00:11 +0200 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2018-07-12 13:00:11 +0200 |
commit | ba1f036a56362885d543f470642230de40df217d (patch) | |
tree | 1ad2923fc10de7529b4d5342d9ec8bb98fe79162 /tests/concepts | |
parent | 9aad193d2753ffb6ec619d45c8f29cb9db864b35 (diff) | |
download | Nim-ba1f036a56362885d543f470642230de40df217d.tar.gz |
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
Diffstat (limited to 'tests/concepts')
-rw-r--r-- | tests/concepts/t8280.nim | 16 |
1 files changed, 16 insertions, 0 deletions
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()]) |