www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 15560] New: is expression with template parameter list and

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

          Issue ID: 15560
           Summary: is expression with template parameter list and fqn
                    fails
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: doob me.com

The following example fails to compile:

import std.stdio;
import std.typecons;

void main()
{
    Nullable!(int) a;

    static if(is(typeof(a) == std.typecons.Nullable!(U), U))
        writeln("true");
    else
        writeln("false");
}

If I don't use a fully qualified name in the is-expression it compiles
successfully. I've tried to compile with DMD 2.070.0-b1 and a bunch of older
versions as well.

--
Jan 12 2016