Bug 5312 – Function redefinition is allowed (duplicate functions)

Status
RESOLVED
Resolution
DUPLICATE
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
Other
OS
Windows
Creation time
2010-12-03T06:32:00Z
Last change time
2010-12-03T17:37:29Z
Assigned to
nobody
Creator
bruno.do.medeiros+deebugz

Comments

Comment #0 by bruno.do.medeiros+deebugz — 2010-12-03T06:32:16Z
The following compiles fine in terms of semantic analysis: bool foo() { return false; } bool foo() { return false; } class X { bool foo() { return false; } bool foo() { return false; } } Rather we get two "Previous Definition Different" linker errors. But surely this should be a compiler error, right? (at the semantic level)
Comment #1 by smjg — 2010-12-03T17:37:29Z
*** This issue has been marked as a duplicate of issue 1003 ***