summary refs log tree commit diff stats
path: root/tests/generics/t20996.nim
blob: 8aa83c4e21ac3a01d4752922e4f4df3854b3e5c8 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
discard """
  action: compile
"""

import std/macros

macro matchMe(x: typed): untyped =
  discard x.getTypeImpl

type
  ElementRT = object
  Element[Z] = ElementRT # this version is needed, even though we don't use it

let ar = ElementRT()
matchMe(ar)