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

          Issue ID: 15063
           Summary: Template Instantiation Accepts Invalid Code
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: [email protected]
          Reporter: [email protected]

The following code should not compile, as the call to test1 matches both
overloads.


import std.typecons : Flag;

void test1(alias pred="a == b", T)(T a) {}

alias SomeFlag = Flag!"SomeFlag";
void test1(SomeFlag allocate_gc = SomeFlag.no, T)(T a) {}

void main()
{
    test1(1);
}

--

Reply via email to