According to TDPL page 355, there is no such restriction, i.e. the implication is that casting to, but not from, immutable, is allowed in @safe code. I've been meaning to ask about this for a long time, but this revision reminded me.

On 11/13/2010 8:54 PM, Don Clugston wrote:
That's not a bug in the spec. That's a bug in the compiler -- that
shouldn't compile. Please change it to @trusted.

On 14 November 2010 02:50, David Simcha<[email protected]>  wrote:
I feel like this is a huge bug in the spec.  Why is casting to immutable
allowed in @safe code?

On 11/13/2010 8:46 PM, dsource.org wrote:
phobos commit, revision 2164


user: Masahiro Nakagawa

msg:
Added pure, nothrow and @safe to assumeUnique function

http://www.dsource.org/projects/phobos/changeset/2164

_______________________________________________
phobos mailing list
[email protected]
http://lists.puremagic.com/mailman/listinfo/phobos

_______________________________________________
phobos mailing list
[email protected]
http://lists.puremagic.com/mailman/listinfo/phobos

_______________________________________________
phobos mailing list
[email protected]
http://lists.puremagic.com/mailman/listinfo/phobos


_______________________________________________
phobos mailing list
[email protected]
http://lists.puremagic.com/mailman/listinfo/phobos

Reply via email to