new tester; all tests categorized
This commit is contained in:
parent
51ee524109
commit
20b5f31c03
481 changed files with 794 additions and 2506 deletions
18
tests/implicit/timplictderef.nim
Normal file
18
tests/implicit/timplictderef.nim
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
discard """
|
||||
output: "2"
|
||||
"""
|
||||
|
||||
type
|
||||
TValue* {.pure, final.} = object of TObject
|
||||
a: int
|
||||
PValue = ref TValue
|
||||
PPValue = ptr PValue
|
||||
|
||||
|
||||
var x: PValue
|
||||
new x
|
||||
var sp: PPValue = addr x
|
||||
|
||||
sp.a = 2
|
||||
if sp.a == 2: echo 2 # with sp[].a the error is gone
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue