www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 895] New: multiply defined function via alias isn't failing to build

reply d-bugmail puremagic.com writes:
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 digitalmars.com
        ReportedBy: braddr 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?


-- 
Jan 27 2007
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=895


bugzilla digitalmars.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |enhancement





It gives a link error on Windows, too. While it would be nice if the compiler
issued the error, an error is still generated at build time. Moved to
enhancement.


-- 
Jan 28 2007
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=895


yebblies <yebblies gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |yebblies gmail.com
         Resolution|                            |DUPLICATE



*** This issue has been marked as a duplicate of issue 656 ***

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jan 31 2012
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=895




Wrong bug number

*** This issue has been marked as a duplicate of issue 2789 ***

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