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

          Issue ID: 14586
           Summary: can't get an immutable value from a const
                    std.variant.Variant
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: Phobos
          Assignee: [email protected]
          Reporter: [email protected]

----
import std.variant;
void main()
{
    const Variant v = new immutable Object;
    auto o = v.get!(immutable Object); /* line 5 */
}
----
test.d(5): Error: mutable method
std.variant.VariantN!32LU.VariantN.get!(immutable(Object)).get is not callable
using a const object
----

Pull request on the way.

--

Reply via email to