D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 3134 - Conflicting Class Names Permitted From Imported File
Summary: Conflicting Class Names Permitted From Imported File
Status: RESOLVED INVALID
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D1 (retired)
Hardware: Other Windows
: P2 major
Assignee: No Owner
URL:
Keywords: accepts-invalid
Depends on:
Blocks:
 
Reported: 2009-07-03 21:55 UTC by Nick Sabalausky
Modified: 2014-04-18 09:12 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Nick Sabalausky 2009-07-03 21:55:23 UTC
This compiles but should not:

--------------------
module main;
import inc;

class Foo {}
void main()
{
	auto f = new Foo();
}
--------------------
module inc;
class Foo {}
--------------------
Comment 1 Martin Nowak 2012-02-12 19:00:21 UTC
Symbols defined in a module have precedence over imported symbols.
You will only get an error if Foo was declared in two different imported modules.