That passes on OSX. Don Clugston wrote:
Cool. This is definitely a compiler bug; it's negating the long before it stores it. Maybe this is a reduced test case:void foo(T : long)(T x) { ulong q = cast(ulong)((x < 0) ? -x : x); assert(q == 0x1234_5678_9ABC_5A5AL); } void bar(T : long)(T x) { foo(x); } void main() { bar(0x1234_5678_9ABC_5A5AL); } If that passes, it may be a problem with opAssign or with passing ulong as a function parameter between modules. _______________________________________________ phobos mailing list [email protected] http://lists.puremagic.com/mailman/listinfo/phobos
_______________________________________________ phobos mailing list [email protected] http://lists.puremagic.com/mailman/listinfo/phobos
