summary refs log tree commit diff stats
path: root/tests/ccgbugs/tconstobj.nim
blob: 98f441e83d7df18705e21eb33a43f137098a497f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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"]