fixes #1547
This commit is contained in:
parent
c1930f1b6e
commit
7edf6fc1d2
3 changed files with 20 additions and 2 deletions
16
tests/ccgbugs/tconstobj.nim
Normal file
16
tests/ccgbugs/tconstobj.nim
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
discard """
|
||||
output: '''(FirstName: James, LastName: Franco)'''
|
||||
"""
|
||||
|
||||
# bug #1547
|
||||
import tables
|
||||
|
||||
type Person* = object
|
||||
FirstName*: string
|
||||
LastName*: string
|
||||
|
||||
let people = {
|
||||
"001": Person(FirstName: "James", LastName: "Franco")
|
||||
}.toTable()
|
||||
|
||||
echo people["001"]
|
||||
Loading…
Add table
Add a link
Reference in a new issue