diff options
author | Jason Beetham <beefers331@gmail.com> | 2021-07-27 01:36:59 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-27 09:36:59 +0200 |
commit | ed44618deb7173ecfe41420fc90871b83a0d08ca (patch) | |
tree | d554d47f13d3a5b712e8c40182f1deeb411162e8 /tests | |
parent | fa0209609d3bedd3466f162aa350d261907851ce (diff) | |
download | Nim-ed44618deb7173ecfe41420fc90871b83a0d08ca.tar.gz |
Fixed const tuples in inferred generics (#18598)
Diffstat (limited to 'tests')
-rw-r--r-- | tests/tuples/tinferred_generic_const.nim | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/tuples/tinferred_generic_const.nim b/tests/tuples/tinferred_generic_const.nim new file mode 100644 index 000000000..5ab730c38 --- /dev/null +++ b/tests/tuples/tinferred_generic_const.nim @@ -0,0 +1,14 @@ +discard """ + action: run +""" +block: + proc something(a: string or int or float) = + const (c, d) = (default a.type, default a.type) + +block: + proc something(a: string or int) = + const c = default a.type + +block: + proc something(a: string or int) = + const (c, d, e) = (default a.type, default a.type, default a.type) |