diff options
Diffstat (limited to 'tests/tuples/tinferred_generic_const.nim')
-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) |