You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
macroBug() =let a =@[123]
discard@[456] & a
let c =@[789] & a
assert c[1] ==123Bug()
command line: nim check --gc:arc a.nim
Current Output
Hint: used config file 'C:\Users\CodeHz\.choosenim\toolchains\nim-1.4.2\config\nim.cfg' [Conf]
Hint: used config file 'C:\Users\CodeHz\.choosenim\toolchains\nim-1.4.2\config\config.nims' [Conf]
....
stack trace: (most recent call last)
D:\Temp\nimbug\b.nim(5, 11) Bug
C:\Users\CodeHz\.choosenim\toolchains\nim-1.4.2\lib\system\assertions.nim(30, 26) failedAssertImpl
C:\Users\CodeHz\.choosenim\toolchains\nim-1.4.2\lib\system\assertions.nim(23, 11) raiseAssert
C:\Users\CodeHz\.choosenim\toolchains\nim-1.4.2\lib\system\fatal.nim(49, 5) sysFatal
D:\Temp\nimbug\b.nim(7, 4) template/generic instantiation of `Bug` from here
C:\Users\CodeHz\.choosenim\toolchains\nim-1.4.2\lib\system\fatal.nim(49, 5) Error: unhandled exception: D:\Temp\nimbug\b.nim(5, 10) `c[1] == 123` [AssertionDefect]
Expected Output
should no error at compile-time
Possible Solution
replace seq with another user-defined list
Additional Information
$ nim -v
Nim Compiler Version 1.4.2 [Linux: amd64]
Compiled at 2020-12-20
Copyright (c) 2006-2020 by Andreas Rumpf
active boot switches: -d:release -d:danger
The text was updated successfully, but these errors were encountered:
codehz
changed the title
ARC/nimSeqsV2 breaks compile-time evaluation (macro)
ARC/nimSeqsV2 breaks seq at compile-time (macro)
Jan 28, 2021
Example
command line:
nim check --gc:arc a.nim
Current Output
Expected Output
should no error at compile-time
Possible Solution
replace seq with another user-defined list
Additional Information
The text was updated successfully, but these errors were encountered: