borrow dots for distinct types documented
This commit is contained in:
parent
cdb4d83ead
commit
7874c0efcb
3 changed files with 35 additions and 1 deletions
13
tests/distinct/tborrowdot.nim
Normal file
13
tests/distinct/tborrowdot.nim
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
|
||||
type
|
||||
Foo = object
|
||||
a, b: int
|
||||
s: string
|
||||
|
||||
Bar {.borrow: `.`.} = distinct Foo
|
||||
|
||||
var bb: ref Bar
|
||||
new bb
|
||||
bb.a = 90
|
||||
bb.s = "abc"
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue