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
SIGSEGV: Illegal storage access. (Attempt to read from nil?)
Segmentation fault (core dumped)
Expected Output
A compiler error. Either something like
Error: invalid type: 'lent Test' in this context: 'proc (self: lent Test)' for proc
(which is what happens without {.experimental: "views".}, based on #16898 (comment)) or an error because self is modified through a lent.
Possible Solution
Disallow lent for parameters.
Additional Information
Related issue: #16898.
I decided to open a new issue for this, since this causes a segfault instead of invalid codegen, but the underlying issue seems to be the same.
$ nim -v
Nim Compiler Version 1.5.1 [Linux: amd64]
Compiled at 2021-04-02
Copyright (c) 2006-2021 by Andreas Rumpf
git hash: 9abd383
active boot switches: -d:release
The text was updated successfully, but these errors were encountered:
Example
Current Output
Expected Output
A compiler error. Either something like
(which is what happens without
{.experimental: "views".}
, based on #16898 (comment)) or an error becauseself
is modified through alent
.Possible Solution
lent
for parameters.Additional Information
Related issue: #16898.
I decided to open a new issue for this, since this causes a segfault instead of invalid codegen, but the underlying issue seems to be the same.
The text was updated successfully, but these errors were encountered: