[Issue 895] New: multiply defined function via alias isn't failing to build

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sat Jan 27 00:05:26 PST 2007


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

           Summary: multiply defined function via alias isn't failing to
                    build
           Product: D
           Version: 1.00
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Keywords: accepts-invalid
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: bugzilla at digitalmars.com
        ReportedBy: braddr at puremagic.com


// $HeadURL: http://dstress.kuehne.cn/nocompile/alias_05.d $
// $Date: 2005-12-03 23:19:07 +0100 (Sat, 03 Dec 2005) $
// $Author: thomask $

// __DSTRESS_ELINE__ 14

module dstress.nocompile.alias_05;

alias int myint;

void foo(int x) {
}

void foo(myint m) { // error, multiply defined function foo
}


The compiler phase doesn't fail, though the linker does (at least on linux,
haven't tested windows).  Since alias' are supposed to be weak and
type-invisible, this should be an error, no?


-- 



More information about the Digitalmars-d-bugs mailing list