http://d.puremagic.com/issues/show_bug.cgi?id=3667
Luther Tychonievich <la...@virginia.edu> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |la...@virginia.edu --- Comment #1 from Luther Tychonievich <la...@virginia.edu> 2010-01-12 13:09:11 PST --- More details: for any primitive type (all integer, character, and floating point types, including unsigned, complex, and typedef'd varieties thereof) the out contract's result will always be type.init. For example, the following code works (and shouldn't, the out contract is incorrect): ------- typedef cdouble sometype = 4.0 + 2.0i; sometype buggy() out(result) { assert( result == 4.0 + 2.0i ); } // should fail but doesn't body { return cast(sometype)0; } unittest { assert(buggy() == 0); } ------- This does not happen for structs, classes, static or dynamic arrays (all seem to function correctly). -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------