p[] instead of p^
This commit is contained in:
parent
3d696c3da5
commit
46c41e4369
32 changed files with 242 additions and 346 deletions
11
tests/accept/run/tnewderef.nim
Normal file
11
tests/accept/run/tnewderef.nim
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
discard """
|
||||
output: 3
|
||||
|
||||
"""
|
||||
|
||||
var x: ref int
|
||||
new(x)
|
||||
x[] = 3
|
||||
|
||||
echo x[]
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue