summary refs log blame commit diff stats
path: root/tests/overload/importB.nim
blob: 2dc3adf7a7c9dcdc3c8d2952efb3e80c1b759db1 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15














                                                 
type
  Foo*[T] = object
    v*: T

template `+`*(x: Foo, y: Foo): untyped = x

template newvar*(r: untyped): untyped {.dirty.} =
  var r: float

template t1*(x: Foo): untyped =
  newvar(y1)
  x
template t2*(x: Foo): untyped =
  newvar(y2)
  x