mirror of
https://github.com/nim-lang/Nim.git
synced 2026-01-05 20:47:53 +00:00
21 lines
387 B
Nim
21 lines
387 B
Nim
# issue #6981
|
|
|
|
{.experimental: "callOperator".}
|
|
|
|
block: # issue #6981
|
|
proc `()`(a:string, b:string):string = a & b
|
|
|
|
var s = newSeq[int](3)
|
|
|
|
doAssert s == @[0, 0, 0]
|
|
|
|
block: # generalized example from #6981
|
|
proc mewSeq[T](a: int)=discard
|
|
proc mewSeq[T]()= discard
|
|
mewSeq[int]()
|
|
|
|
block: # issue #9831
|
|
type Foo = object
|
|
proc `()`(foo: Foo) = discard
|
|
let x = newSeq[int]()
|