www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 15063] New: Template Instantiation Accepts Invalid Code


          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: nobody puremagic.com
          Reporter: jack jackstouffer.com

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

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()

Sep 15 2015