tnewseq.nim 410 B

1234567891011121314151617181920212223
  1. # issue #6981
  2. import std/assertions
  3. {.experimental: "callOperator".}
  4. block: # issue #6981
  5. proc `()`(a:string, b:string):string = a & b
  6. var s = newSeq[int](3)
  7. doAssert s == @[0, 0, 0]
  8. block: # generalized example from #6981
  9. proc mewSeq[T](a: int)=discard
  10. proc mewSeq[T]()= discard
  11. mewSeq[int]()
  12. block: # issue #9831
  13. type Foo = object
  14. proc `()`(foo: Foo) = discard
  15. let x = newSeq[int]()