diff options
author | Ganesh Viswanathan <dev@genotrance.com> | 2018-09-14 14:04:32 -0500 |
---|---|---|
committer | Ganesh Viswanathan <dev@genotrance.com> | 2018-09-14 14:04:32 -0500 |
commit | e07a256f74b9e89e49287c8a21c1334af43e27c2 (patch) | |
tree | 5a782d7e8c4ba90282ea7ddcb7c438281f7e81eb | |
parent | 7af659cf59ce85ea1d928c17475f5174a6ea4e52 (diff) | |
download | Nim-e07a256f74b9e89e49287c8a21c1334af43e27c2.tar.gz |
Test case for #6483
-rw-r--r-- | tests/errmsgs/t6483.nim | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/tests/errmsgs/t6483.nim b/tests/errmsgs/t6483.nim new file mode 100644 index 000000000..59ea6d7e2 --- /dev/null +++ b/tests/errmsgs/t6483.nim @@ -0,0 +1,31 @@ +discard """ + errormsg: "request to generate code for .compileTime proc: newSeq" + line: 21 +""" + +type + VarItem = object + onode: NimNode + nnode: NimNode + suffix: string + + VarState = object + scopes: seq[VarScope] + + VarScope = object + variables: seq[VarItem] + children: seq[VarScope] + +when isMainModule: + var scope1 = VarScope( + variables: newSeq[VarItem](), + children: newSeq[VarScope]() + ) + var scope2 = VarScope( + variables: newSeq[VarItem](), + children: newSeq[VarScope]() + ) + var state = VarState(scopes: newSeq[VarScope]()) + state.scopes.add(scope1) + state.scopes[0].children.add(scope2) + echo($state.scopes) \ No newline at end of file |