[Issue 10728] A combination of implicit conversion and lambda call cannot be compiled

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Mon Jun 26 07:04:24 PDT 2017


https://issues.dlang.org/show_bug.cgi?id=10728

Vladimir Panteleev <dlang-bugzilla at thecybershadow.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |dlang-bugzilla at thecybershad
                   |                            |ow.net
         Resolution|---                         |INVALID

--- Comment #2 from Vladimir Panteleev <dlang-bugzilla at thecybershadow.net> ---
In D2, use .idup to create a copy of an immutable string.

The result of .dup will implicitly convert to a string in some circumstances as
a convenience feature to ease migration from D1. It works because the compiler
knows that although the result of .dup is mutable, it is also unique. However,
this inference is limited by design.

--


More information about the Digitalmars-d-bugs mailing list