tusingstmt.nim 259 B

1234567891011121314151617
  1. type
  2. Foo = object
  3. using
  4. c: Foo
  5. x, y: int
  6. proc usesSig(c) = discard
  7. proc foobar(c, y) = discard
  8. usesSig(Foo())
  9. foobar(Foo(), 123)
  10. doAssert not compiles(usesSig(123))
  11. doAssert not compiles(foobar(Foo(), Foo()))
  12. doAssert not compiles(foobar(123, 123))