mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-30 01:44:37 +00:00
20 lines
331 B
Nim
20 lines
331 B
Nim
discard """
|
|
output: '''0'''
|
|
"""
|
|
|
|
# bug #206
|
|
template optimizeOut{testFunc(a, b)}(a: int, b: int{alias}): untyped = 0
|
|
|
|
proc testFunc(a, b: int): int = result = a + b
|
|
var testVar = 1
|
|
echo testFunc(testVar, testVar)
|
|
|
|
|
|
template ex{a = b + c}(a : int{noalias}, b, c : int) =
|
|
a = b
|
|
inc a, b
|
|
echo "came here"
|
|
|
|
var x = 5
|
|
x = x + x
|