summary refs log tree commit diff stats
path: root/tests/enum/ttypenameconflict.nim
blob: b13bf00cee0eb6c0bc7e7dfdbab385b054cb45e8 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
# issue #23689

type
  MyEnum {.pure.} = enum
    A, B, C, D

  B = object
    field: int

let x: MyEnum = B
doAssert $x == "B"
doAssert typeof(x) is MyEnum
doAssert x in {A, B}