5312 – Function redefinition is allowed (duplicate functions)

D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 5312 - Function redefinition is allowed (duplicate functions)
Summary: Function redefinition is allowed (duplicate functions)
Status: RESOLVED DUPLICATE of issue 1003
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: Other Windows
: P2 normal
Assignee: No Owner
URL:
Keywords:
Depends on:
Blocks:
Reported: 2010年12月03日 06:32 UTC by Bruno Medeiros
Modified: 2010年12月03日 17:37 UTC (History)
1 user (show)

See Also:


Attachments
Add an attachment (proposed patch, testcase, etc.)

Note You need to log in before you can comment on or make changes to this issue.
Description Bruno Medeiros 2010年12月03日 06:32:16 UTC
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 Stewart Gordon 2010年12月03日 17:37:29 UTC
*** This issue has been marked as a duplicate of issue 1003 ***


AltStyle によって変換されたページ (->オリジナル) /