implemented region pointers
This commit is contained in:
parent
3e25d5f247
commit
4196757de7
14 changed files with 83 additions and 40 deletions
16
tests/typerel/tregionptrs.nim
Normal file
16
tests/typerel/tregionptrs.nim
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
discard """
|
||||
line: 16
|
||||
errormsg: "type mismatch: got (BPtr) but expected 'APtr'"
|
||||
"""
|
||||
|
||||
type
|
||||
RegionA = object
|
||||
APtr = ptr[RegionA, int]
|
||||
RegionB = object
|
||||
BPtr = ptr[RegionB, int]
|
||||
|
||||
var x,xx: APtr
|
||||
var y: BPtr
|
||||
x = nil
|
||||
x = xx
|
||||
x = y
|
||||
Loading…
Add table
Add a link
Reference in a new issue