mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-28 17:04:41 +00:00
17 lines
259 B
Nim
17 lines
259 B
Nim
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))
|