mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-30 18:02:05 +00:00
* spec for view types * spec additions * refactoring; there are two different kinds of views * refactorings and spec additions * enforce that view types are initialized * enforce borrowing from the first formal parameter * enforce lifetimes for borrowing of locals * typo in the manual * clarify in the implementation what a borrow operation really is
10 lines
176 B
Nim
10 lines
176 B
Nim
discard """
|
|
errormsg: "'result' must borrow from the first parameter"
|
|
line: 9
|
|
"""
|
|
|
|
{.experimental: "views".}
|
|
|
|
proc p(a, b: openArray[char]): openArray[char] =
|
|
result = b
|