diff options
author | Araq <rumpf_a@web.de> | 2012-10-12 23:34:43 +0200 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2012-10-12 23:34:43 +0200 |
commit | 1d307983631b496964d1936a26795fce26da3e39 (patch) | |
tree | 35659ddc63cadea759b99b2ed72c29a34b05f04e /tests/run | |
parent | bfda844ccc7f8910d8003a7902323a19a5efea68 (diff) | |
download | Nim-1d307983631b496964d1936a26795fce26da3e39.tar.gz |
bugfix: threads should work again; fixes #220
Diffstat (limited to 'tests/run')
-rw-r--r-- | tests/run/tmixin.nim | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/tests/run/tmixin.nim b/tests/run/tmixin.nim new file mode 100644 index 000000000..d841326a5 --- /dev/null +++ b/tests/run/tmixin.nim @@ -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) |