summary refs log blame commit diff stats
path: root/tests/generics/m22373b.nim
blob: 67ee4211be0ea2fa07e3659eea633558f4f5b04a (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18

















                                                                     
# module b for t22373

import m22373a

# original:
type
  LightClientDataFork* {.pure.} = enum
    None = 0,
    Altair = 1
template LightClientHeader*(kind: static LightClientDataFork): auto =
  when kind == LightClientDataFork.Altair:
    typedesc[m22373a.LightClientHeader]
  else:
    static: raiseAssert "Unreachable"

# simplified:
template TypeOrTemplate*(num: int): untyped =
  typedesc[m22373a.TypeOrTemplate]