D-Programming-Language/dmd — pull request #797 by 9rnsr (2012-03-11 11:42:15+00:00)
Title: Issue 7682 - shared array type and "cast() is not an lvalue" error

http://d.puremagic.com/issues/show_bug.cgi?id=7682

If you check 'head const convertible', you should keep shared qualifier.

(shared const T)->constOf() == `const T`, but
(shared const T)->mutableOf() == `shared T`, and (shared T)->constOf() == `shared const T`