adds a test case (#24486)

closes #23680

(cherry picked from commit ddf5a9f6c5)
This commit is contained in:
ringabout
2024-12-02 13:39:55 +08:00
committed by narimiran
parent d04f9c426e
commit 062e77bce0

View File

@@ -13,6 +13,7 @@ foo
foo
false
true
0
'''
"""
@@ -302,3 +303,10 @@ block: # bug #21920
discard
t[void]() # Error: expression has no type: discard
template m(a: uint, p: int) = discard
block: # bug #23680
template m(x: untyped, i: int) = echo x
proc j(n: int | int) = m([0][0], 0)
j(0)