summary refs log tree commit diff stats
path: root/tests/js/tvarargs.nim
Commit message (Expand)AuthorAgeFilesLines
* lots of small changesArne Döring2018-12-111-1/+1
* Testament should run tests with no action (#8232)genotrance2018-07-081-0/+3
* made nodecl implicit for vars in the js backend. (#5297)Michael Jendrusch2017-01-291-1/+1
* fixes #3584Araq2016-01-181-0/+12
p;id=fd532b6dab930db7f456700f791065f22c155f9c'>^
e80465dac ^
729e048a3 ^










a5ecbf823 ^
729e048a3 ^
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24





                  

                   

           
                          










                                  
          
        
discard """
  output: '''10'''
"""

# bug #940

type
  Foo* = ref object
    b*: int

proc new*(this: var Foo) =
  assert this != nil
  this.b = 10

proc new*(T: typedesc[Foo]): Foo =
  system.new(result)
  twrongopensymchoice.new(result)

proc main =
  var f = Foo.new()
  echo f.b

when true:
  main()