new tester; all tests categorized
This commit is contained in:
parent
51ee524109
commit
20b5f31c03
481 changed files with 794 additions and 2506 deletions
20
tests/overload/toverl3.nim
Normal file
20
tests/overload/toverl3.nim
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
discard """
|
||||
file: "toverl3.nim"
|
||||
output: '''m1
|
||||
tup1'''
|
||||
"""
|
||||
|
||||
# Tests more specific generic match:
|
||||
|
||||
proc m[T](x: T) = echo "m2"
|
||||
proc m[T](x: var ref T) = echo "m1"
|
||||
|
||||
proc tup[S, T](x: tuple[a: S, b: ref T]) = echo "tup1"
|
||||
proc tup[S, T](x: tuple[a: S, b: T]) = echo "tup2"
|
||||
|
||||
var
|
||||
obj: ref int
|
||||
tu: tuple[a: int, b: ref bool]
|
||||
|
||||
m(obj)
|
||||
tup(tu)
|
||||
Loading…
Add table
Add a link
Reference in a new issue