Co-authored-by: Timothee Cour <timothee.cour2@gmail.com>
This commit is contained in:
parent
b70e33f5bb
commit
eca0b87544
1 changed files with 23 additions and 0 deletions
23
tests/misc/t8545.nim
Normal file
23
tests/misc/t8545.nim
Normal file
|
|
@ -0,0 +1,23 @@
|
||||||
|
discard """
|
||||||
|
targets: "c cpp js"
|
||||||
|
"""
|
||||||
|
|
||||||
|
# bug #8545
|
||||||
|
|
||||||
|
template bar(a: static[bool]): untyped = int
|
||||||
|
|
||||||
|
proc main() =
|
||||||
|
proc foo1(a: static[bool]): auto = 1
|
||||||
|
doAssert foo1(true) == 1
|
||||||
|
|
||||||
|
proc foo2(a: static[bool]): bar(a) = 1
|
||||||
|
doAssert foo2(true) == 1
|
||||||
|
|
||||||
|
proc foo3(a: static[bool]): bar(cast[static[bool]](a)) = 1
|
||||||
|
doAssert foo3(true) == 1
|
||||||
|
|
||||||
|
proc foo4(a: static[bool]): bar(static(a)) = 1
|
||||||
|
doAssert foo4(true) == 1
|
||||||
|
|
||||||
|
static: main()
|
||||||
|
main()
|
||||||
Loading…
Add table
Add a link
Reference in a new issue