fixes 5870 (#11704)

* fixes #5870
* make tclosure test green again
* this check is correct but breaks some Nimble packages
This commit is contained in:
Andreas Rumpf 2019-08-29 07:49:58 +02:00 • committed by GitHub
commit 9203d3a982
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 47 additions and 26 deletions

View file

@ -224,7 +224,7 @@ iterator fields*[T: tuple|object](x: T): RootObj {.
## **Warning**: This really transforms the 'for' and unrolls the loop.
## The current implementation also has a bug
## that affects symbol binding in the loop body.
iterator fields*[S:tuple|object, T:tuple|object](x: S, y: T): tuple[a,b: untyped] {.
iterator fields*[S:tuple|object, T:tuple|object](x: S, y: T): tuple[a, b: RootObj] {.
magic: "Fields", noSideEffect.}
## Iterates over every field of `x` and `y`.
##
@ -266,7 +266,7 @@ iterator fieldPairs*[T: tuple|object](x: T): RootObj {.
## loop body.
iterator fieldPairs*[S: tuple|object, T: tuple|object](x: S, y: T): tuple[
a, b: untyped] {.
a, b: RootObj] {.
magic: "FieldPairs", noSideEffect.}
## Iterates over every field of `x` and `y`.
##