tfail_nested_pointers.nim 210 B

12345678910111213
  1. discard """
  2. errormsg: "ambiguous call"
  3. """
  4. type
  5. A[T] = object
  6. C = object
  7. x:int
  8. proc p[T: A[ptr]](x:ptr[T]):bool = false
  9. proc p(x: ptr[A[ptr]]):bool = true
  10. var a: A[ptr[C]]
  11. doAssert p(a.addr) == true