summary refs log blame commit diff stats
path: root/tests/specialops/tnewseq.nim
blob: 970a5a8c29a7650b4411c834da8f8a4dcc857b94 (plain) (tree)





















                                              
# issue #6981

import std/assertions

{.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]()