summary refs log tree commit diff stats
path: root/tests/xml
ModeNameSize
-rw-r--r--ttree_add.nim912log stats plain blame
-rw-r--r--ttree_add1.nim975log stats plain blame
-rw-r--r--ttree_delete.nim836log stats plain blame
-rw-r--r--ttree_delete1.nim853log stats plain blame
-rw-r--r--ttree_insert.nim1012log stats plain blame
-rw-r--r--ttree_insert1.nim941log stats plain blame
-rw-r--r--ttree_replace.nim874log stats plain blame
-rw-r--r--ttree_replace1.nim1070log stats plain blame
<rumpf_a@web.de> 2014-11-28 02:43:41 +0100 implemented procCall builtin' href='/ahoang/Nim/commit/tests/method/tmultim2.nim?h=devel&id=105a0616a9da7c9c85adfa488a1db42eb17daafb'>105a0616a ^
053309e60 ^

105a0616a ^
053309e60 ^



105a0616a ^



053309e60 ^


5b28d0820 ^
053309e60 ^

105a0616a ^
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39

                      



                                 
   


                    
                                 



                              
 
                                               
                              
 
                                                
                             

                                                
                             



                                    



                                             


             
                                                                                

             
                   
discard """
  file: "tmultim2.nim"
  output: '''collide: unit, thing
collide: unit, thing
collide: thing, unit
collide: thing, thing'''
"""
# Test multi methods

type
  TThing = object {.inheritable.}
  TUnit = object of TThing
    x: int
  TParticle = object of TThing
    a, b: int

method collide(a, b: TThing) {.base, inline.} =
  echo "collide: thing, thing"

method collide(a: TThing, b: TUnit) {.inline.} =
  echo "collide: thing, unit"

method collide(a: TUnit, b: TThing) {.inline.} =
  echo "collide: unit, thing"

proc test(a, b: TThing) {.inline.} =
  collide(a, b)

proc staticCollide(a, b: TThing) {.inline.} =
  procCall collide(a, b)


var
  a: TThing
  b, c: TUnit
collide(b, c) # ambiguous (unit, thing) or (thing, unit)? -> prefer unit, thing!
test(b, c)
collide(a, b)
staticCollide(a, b)