summary refs log tree commit diff stats
path: root/tests/generics/t22373.nim
blob: ecfaf0f1ba3088e6efc6117d368c8748bb9003e6 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# issue #22373

import m22373a
import m22373b

# original:
template lazy_header(name: untyped): untyped {.dirty.} =
  var `name _ ptr`: ptr[data_fork.LightClientHeader]  # this data_fork.Foo part seems required to reproduce
proc createLightClientUpdates(data_fork: static LightClientDataFork) =
  lazy_header(attested_header)
createLightClientUpdates(LightClientDataFork.Altair)

# simplified:
proc generic[T](abc: T) =
  var x: abc.TypeOrTemplate
generic(123)