mirror of
https://github.com/nim-lang/Nim.git
synced 2026-07-19 23:41:29 +00:00
implemented a[^1] notation
This commit is contained in:
10
tests/array/troof2.nim
Normal file
10
tests/array/troof2.nim
Normal file
@@ -0,0 +1,10 @@
|
||||
discard """
|
||||
errormsg: "invalid context for '^' as 'foo()' has side effects"
|
||||
line: "9"
|
||||
"""
|
||||
|
||||
proc foo(): seq[int] =
|
||||
echo "ha"
|
||||
|
||||
let f = foo()[^1]
|
||||
|
||||
Reference in New Issue
Block a user