Do not emit object definition it if used only by ref or ptr
This commit is contained in:
parent
a9f21cffdf
commit
70b28a39fe
4 changed files with 32 additions and 1 deletions
12
tests/ccgbugs/mymodule.nim
Normal file
12
tests/ccgbugs/mymodule.nim
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
type
|
||||
MyRefObject* = ref object
|
||||
s: string
|
||||
|
||||
|
||||
proc newMyRefObject*(s: string): MyRefObject =
|
||||
new(result)
|
||||
result.s = s
|
||||
|
||||
proc `$`*(o: MyRefObject): string =
|
||||
o.s
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue