Fixes 6544 (#9427)
* Fix call to converters with var/lent args Fixes #6544 * Fix printing of lent types * lent is only valid for result types
This commit is contained in:
parent
d0dd5ea887
commit
16a70c84aa
3 changed files with 20 additions and 1 deletions
|
|
@ -18,3 +18,11 @@ converter toPtr*(some: var TFoo): ptr TFoo = (addr some)
|
|||
proc zoot(x: ptr TFoo) = discard
|
||||
var x: Tfoo
|
||||
zoot(x)
|
||||
|
||||
# issue #6544
|
||||
converter withVar(b: var string): int = ord(b[1])
|
||||
|
||||
block:
|
||||
var x = "101"
|
||||
var y: int = x # instantiate withVar
|
||||
doAssert(y == ord('0'))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue