new tester; all tests categorized
This commit is contained in:
parent
51ee524109
commit
20b5f31c03
481 changed files with 794 additions and 2506 deletions
27
tests/bind/tmixin.nim
Normal file
27
tests/bind/tmixin.nim
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
discard """
|
||||
output: "1\n2"
|
||||
"""
|
||||
|
||||
type
|
||||
TFoo1 = object of TObject
|
||||
v: int
|
||||
TFoo2 = object of TFoo1
|
||||
v2: int
|
||||
|
||||
proc test(f: TFoo1) =
|
||||
echo "1"
|
||||
|
||||
proc Foo[T](f: T) =
|
||||
mixin test
|
||||
test(f)
|
||||
|
||||
var
|
||||
a: TFoo1
|
||||
b: TFoo2
|
||||
|
||||
|
||||
proc test(f: TFoo2) =
|
||||
echo "2"
|
||||
|
||||
Foo(a)
|
||||
Foo(b)
|
||||
Loading…
Add table
Add a link
Reference in a new issue