[Issue 12403] [AA] Associative array `get` function rejects some cases

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Apr 16 21:11:39 PDT 2014


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

Kenji Hara <k.hara.pg at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |pull
          Component|druntime                    |DMD

--- Comment #3 from Kenji Hara <k.hara.pg at gmail.com> ---
This is a compiler issue that current IFTI cannot deduce correct type
parameters for the case:

void test12403()
{
    void func(K, V)(inout(V[K]) aa)
    {
        static assert(is(V == const int));
        static assert(is(K == int));
    }

    const(int)[int] m;
    func(m);   // fails, but should work
}

https://github.com/D-Programming-Language/dmd/pull/3465

--


More information about the Digitalmars-d-bugs mailing list