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















                                           
type
  Foo = object

using
  c: Foo
  x, y: int

proc usesSig(c) = discard

proc foobar(c, y) = discard

usesSig(Foo())
foobar(Foo(), 123)
doAssert not compiles(usesSig(123))
doAssert not compiles(foobar(Foo(), Foo()))
doAssert not compiles(foobar(123, 123))