fork download
  1. import system
  2.  
  3. type Bar[T] = ref object
  4. value: T
  5.  
  6. type types = int32|int64 # if I change this to just int32 or int64 it works
  7.  
  8. proc Foo[T: Bar[types]](): T =
  9. when T is Bar: nil
  10.  
  11. discard Foo[Bar[int32]]()
Success #stdin #stdout 0s 6828KB
stdin
Standard input is empty
stdout
Standard output is empty