summary refs log blame commit diff stats
path: root/tests/misc/tupcomingfeatures.nim
blob: d37ce85cffd69196751c54d8060a39ab3b245752 (plain) (tree)
1
2
3
4
5
6
7
8
9
10

                   
       




              

                
























                                      
discard """
  output: '''0 -2 0
0 -2'''
"""

{.this: self.}

type
  Foo = object
    a, b, x: int

proc yay(self: Foo) =
  echo a, " ", b, " ", x

proc footest[T](self: var Foo, a: T) =
  b = 1+a
  yay()

proc nongeneric(self: Foo) =
  echo a, " ", b

var ff: Foo
footest(ff, -3)
ff.nongeneric

{.experimental.}
using
  c: Foo
  x, y: int

proc usesSig(c) =
  echo "yummy"

proc foobar(c, y) =
  echo "yay"