fix #5648
This commit is contained in:
parent
ee4b98ec17
commit
eb635d9ccf
2 changed files with 25 additions and 2 deletions
21
tests/types/t5648.nim
Normal file
21
tests/types/t5648.nim
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
discard """
|
||||
output: "ptr Foo"
|
||||
"""
|
||||
|
||||
import typetraits
|
||||
|
||||
type Foo = object
|
||||
bar*: int
|
||||
|
||||
proc main() =
|
||||
var f = create(Foo)
|
||||
f.bar = 3
|
||||
echo f.type.name
|
||||
|
||||
discard realloc(f, 0)
|
||||
|
||||
var g = Foo()
|
||||
g.bar = 3
|
||||
|
||||
main()
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue