summary refs log tree commit diff stats
path: root/tests/concepts/t6770.nim
blob: 1787ee670b3b9451baca01e1447e56766c5fb0c6 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
discard """
output: '''
10
10
'''
"""

type GA = concept c
  c.a is int

type A = object
  a: int

type AA = object
  case exists: bool
  of true:
    a: int
  else:
    discard

proc print(inp: GA) =
  echo inp.a

let failing = AA(exists: true, a: 10)
let working = A(a:10)
print(working)
print(failing)