diff options
author | Andreas Rumpf <rumpf_a@web.de> | 2020-09-27 09:20:10 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-27 09:20:10 +0200 |
commit | 57b7841c184e9f185d6d2404a1320e5d089e0e0f (patch) | |
tree | f4d424fd978778cd3260073d724a6ab6f7c14574 /tests/effects | |
parent | e6616115e65381aaab427c557431d7992bb25063 (diff) | |
download | Nim-57b7841c184e9f185d6d2404a1320e5d089e0e0f.tar.gz |
better support for slices as views (#15414)
* moved view tests to tests/views * refactoring * more refactorings * better support for system.toOpenArray for first class view types
Diffstat (limited to 'tests/effects')
-rw-r--r-- | tests/effects/tcannot_borrow.nim | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/tests/effects/tcannot_borrow.nim b/tests/effects/tcannot_borrow.nim deleted file mode 100644 index 699176b04..000000000 --- a/tests/effects/tcannot_borrow.nim +++ /dev/null @@ -1,18 +0,0 @@ -discard """ - errormsg: "cannot borrow" - nimout: '''tcannot_borrow.nim(16, 7) Error: cannot borrow meh; what it borrows from is potentially mutated -tcannot_borrow.nim(17, 3) the mutation is here -tcannot_borrow.nim(16, 7) is the statement that connected the mutation to the parameter''' - line: 16 -""" - -{.experimental: "views".} - -type - Foo = object - field: string - -proc dangerous(s: var seq[Foo]) = - let meh: lent Foo = s[0] - s.setLen 0 - echo meh.field |