Fix doubly typed forward declarations (#18279)

* Add testcase

* Fix testcase

* Fix doubly typed forward decls

* Better fix
This commit is contained in:
Clyybber 2021-06-16 16:40:22 +02:00 • committed by GitHub
commit 13b94c0297
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 27 additions and 2 deletions

View file

@ -484,6 +484,26 @@ func expMin: float {.aadMin.} = 1
echo expMin()
# doubly-typed forward decls
macro noop(x: typed) = x
noop:
proc cally() = discard
cally()
noop:
proc barry()
proc barry() = discard
# some more:
proc barry2() {.noop.}
proc barry2() = discard
proc barry3() {.noop.}
proc barry3() {.noop.} = discard
# issue #15389
block double_sem_for_procs:
@ -498,4 +518,4 @@ block double_sem_for_procs:
return x1 + 1.0
result = 10.0
discard exp(5.0)
discard exp(5.0)