* allow result symbol reuse

* try different approach

* Revert "try different approach"

This reverts commit abcfb6b75983c2f798cc887342ff1a9ff10c0324.
This commit is contained in:
cooldome 2020-09-24 00:07:30 +01:00 • committed by GitHub
commit f21a49b2c4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 44 additions and 24 deletions

View file

@ -480,3 +480,20 @@ func expMin: float
func expMin: float {.aadMin.} = 1
echo expMin()
# issue #15389
block double_sem_for_procs:
macro aad(fns: varargs[typed]): typed =
result = newStmtList()
for fn in fns:
result.add fn
func exp(x: float): float {.aad.} =
var x1 = min(max(x, -708.4), 709.8)
if x1 > 0.0:
return x1 + 1.0
result = 10.0
discard exp(5.0)