-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Co-authored-by: Timothee Cour <[email protected]>
- Loading branch information
1 parent
b70e33f
commit eca0b87
Showing
1 changed file
with
23 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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() |