We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
toSeq(bar())
bar()
when true: import sequtils iterator myIter(): auto {.closure.} = yield 1 yield 2 proc bar(): auto = doAssert false myIter echo "z1" echo toSeq(myIter) # comment this and bug goes away echo "z2" echo toSeq(bar())
z1 @[1, 2] z2 @[1, 2]
doAssert false called
doAssert false
devel 1.5.1 0d0e434 (timotheecour#322 would avoid this issue and all other issues with toSeq)
toSeq
The text was updated successfully, but these errors were encountered:
iterable[T]
expandMacros output:
import sequtils iterator myIter(): auto {.closure.} = yield 1 yield 2 proc bar(): auto = result = const expr`gensym0 = "false" const loc`gensym1 = (filename: "/usercode/in.nim", line: 9, column: 13) ploc`gensym1 = "/usercode/in.nim(9, 14)" {.line: (filename: "/usercode/in.nim", line: 9, column: 13).}: if true: failedAssertImpl("/usercode/in.nim(9, 14) `false` ") myIter echo ["z1"] echo [ template iter2_4950003(): untyped = myIter() type OutType`gensym8 = typeof(iter2()) var result`gensym8: seq[OutType`gensym8] = @[] for x`gensym8 in myIter(): add(result`gensym8, x`gensym8) result`gensym8] echo ["z2"] echo [ template iter2_5040003(): untyped = bar()() type OutType`gensym23 = typeof(iter2()) var result`gensym23: seq[OutType`gensym23] = @[] for x`gensym23 in myIter(): add(result`gensym23, x`gensym23) result`gensym23]
Sorry, something went wrong.
No branches or pull requests
Example
Current Output
z1
@[1, 2]
z2
@[1, 2]
Expected Output
doAssert false
calledAdditional Information
devel 1.5.1 0d0e434
(timotheecour#322 would avoid this issue and all other issues with
toSeq
)The text was updated successfully, but these errors were encountered: