http://d.puremagic.com/issues/show_bug.cgi?id=4251
yebblies <yebbl...@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |accepts-invalid, patch CC| |yebbl...@gmail.com --- Comment #3 from yebblies <yebbl...@gmail.com> 2011-06-12 08:14:13 PDT --- https://github.com/D-Programming-Language/dmd/pull/115 When implicitly converting types with indirections, only allow the following results: > completely mutable > completely non-mutable > exactly one mutable indirection > the same number of mutable indirections as before eg. > T*** => const(T***) allowed, full const > T*** => const(T**)* allowed, tail const > T*** => const(T*)** not allowed > T*** => const(T)*** not allowed > T*** => T*** allowed, same number of mutable indirections > immutable(T*)** => const(T*)** allowed, same number of mutable indirections etc This prevents (as far as I know) using implicit conversions to let a pointer to mutable and a pointer to immutable point to the same place using const conversions. eg. int** a = [new int].ptr; const(int)*** b = &a; *b = [new immutable(int)].ptr; The same applies to other reference types. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------