summary refs log tree commit diff stats
path: root/tests/stdlib/tobjectdollar.nim
blob: cf78fa255af7c48d5fda46e8d555b2ee6cbe3a7c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
discard """
  matrix: "-d:nimPreviewSlimSystem"
"""

import std/assertions

type Foo = object
  a, b: int

let x = Foo(a: 23, b: 45)
doAssert not compiles($x)
import std/objectdollar
doAssert compiles($x)
doAssert $x == "(a: 23, b: 45)"