diff options
author | Zahary Karadjov <zahary@gmail.com> | 2013-12-31 12:39:43 +0200 |
---|---|---|
committer | Zahary Karadjov <zahary@gmail.com> | 2013-12-31 12:39:43 +0200 |
commit | 8e0941576fc30643a4cdcb532e180d0ca973ed85 (patch) | |
tree | c24122841d1129846068ee851b99a104a07b82d5 /tests | |
parent | ed3ab6539dde803eef0c91d5b8edd58408ba86d8 (diff) | |
download | Nim-8e0941576fc30643a4cdcb532e180d0ca973ed85.tar.gz |
clean-up some obsolete code; close #602
Diffstat (limited to 'tests')
-rw-r--r-- | tests/compile/tcompositetypeclasses.nim | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/compile/tcompositetypeclasses.nim b/tests/compile/tcompositetypeclasses.nim index 3e6f0d6ae..a2db73769 100644 --- a/tests/compile/tcompositetypeclasses.nim +++ b/tests/compile/tcompositetypeclasses.nim @@ -43,3 +43,17 @@ proc f[T](a: TVecT[T], b: TVecT[T]): T = discard var x: float = f([0.0'f32, 0.0'f32], [0.0'f32, 0.0'f32]) var y = f(TVec2([0.0'f32, 0.0'f32]), TVec2([0.0'f32, 0.0'f32])) +# https://github.com/Araq/Nimrod/issues/602 +type + TTest = object + TTest2* = object + TUnion = TTest | TTest2 + +proc f(src: ptr TUnion, dst: ptr TUnion) = + echo("asd") + +var tx: TTest +var ty: TTest2 + +accept f(addr tx, addr tx) +reject f(addr tx, addr ty) |