fix is "closure" (#16552)

This commit is contained in:
flywind 2021-01-02 10:11:46 -06:00 • committed by GitHub
commit b8775bff57
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 2 deletions

View file

@ -4,6 +4,15 @@ discard """
import std/hashes
when not defined(js) and not defined(cpp):
block:
var x = 12
iterator hello(): int {.closure.} =
yield x
discard hash(hello)
block hashes:
block hashing:
var dummy = 0.0