http://d.puremagic.com/issues/show_bug.cgi?id=6864
Summary: Const conversion should precedence over the shared one Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: k.hara...@gmail.com --- Comment #0 from Kenji Hara <k.hara...@gmail.com> 2011-10-30 06:49:25 PDT --- BasicTypes can convert shared from/to non-shared with copy, but the shared conversion priority should be lower than const conversions. This means that following code should pass the assertions. int fn( const int n) { return 1; } int fn(shared int n) { return 2; } inout(int) fw(inout int s) { return 1; } inout(int) fw(shared inout int s) { return 2; } int n; assert(fn(n) == 1); assert(fw(n) == 1); shared int sn; assert(fn(sn) == 2); assert(fw(sn) == 2); -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------