www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 13294] New: [IFTI] IFTI fails for function with const and


          Issue ID: 13294
           Summary: [IFTI] IFTI fails for function with const and mutable
                    `ref` parameters of `[u]byte`/`[u]short`
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Keywords: rejects-valid
          Severity: regression
          Priority: P1
         Component: DMD
          Assignee: nobody puremagic.com
          Reporter: verylonglogin.reg gmail.com

This code should compile fine:
void f(T)(const ref T src, ref T dest)
{ }

void main()
    const byte src;
    byte dest;
    f(src, dest);
main.d(8): Error: template main.f cannot deduce function from argument types
!()(const(byte), byte), candidates are:
main.d(1):        main.f(T)(ref const T src, ref T dest)

Note: Fails only for `byte`/`ubyte`/`short`/`ushort`.

Aug 15 2014