[Issue 4110] New: Function template with two constraints

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Apr 21 13:53:23 PDT 2010


http://d.puremagic.com/issues/show_bug.cgi?id=4110

           Summary: Function template with two constraints
           Product: D
           Version: future
          Platform: x86
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Optlink
        AssignedTo: nobody at puremagic.com
        ReportedBy: bearophile_hugs at eml.cc


--- Comment #0 from bearophile_hugs at eml.cc 2010-04-21 13:53:21 PDT ---
This D2 code is wrong:

void foo(T)(T x)
  if (is(T == int)) {
  if (!is(T == float)) {
}
void main() {
    foo(1);
}


The dmd 2.043 compiler+linker spit out:

OPTLINK (R) for Win32  Release 8.00.2
Copyright (C) Digital Mars 1989-2009  All rights reserved.
http://www.digitalmars.com/ctg/optlink.html
OPTLINK : Warning 23: No Stack 
OPTLINK : Warning 134: No Start Address

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list