Binary operation on typedefs

2009-12-15 Thread Zarathustra
Do you think is it bug? typedef uint A; typedef AB; const A a1 = cast(A)0x01; const A a2 = cast(A)0x02; const B b1 = cast(B)0x04; const B b2 = cast(B)0x04; const A a3 = a1 | a2; // great it's ok (a1, a2, a3 same type) const A a4 = b1; // great it's ok (b1 is delivered from A) const A a5 = a

Re: Binary operation on typedefs

2009-12-15 Thread div0
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Zarathustra wrote: > Do you think is it bug? > > typedef uint A; > typedef AB; > > const A a1 = cast(A)0x01; > const A a2 = cast(A)0x02; > > const B b1 = cast(B)0x04; > const B b2 = cast(B)0x04; > > const A a3 = a1 | a2; // great it's ok (a1, a

Re: Binary operation on typedefs

2009-12-16 Thread Denis Koroskin
On Wed, 16 Dec 2009 02:45:35 +0300, Zarathustra wrote: Do you think is it bug? typedef uint A; typedef AB; const A a1 = cast(A)0x01; const A a2 = cast(A)0x02; const B b1 = cast(B)0x04; const B b2 = cast(B)0x04; const A a3 = a1 | a2; // great it's ok (a1, a2, a3 same type) const A a4 =