D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 7410 - Wrong error message for selective import
Summary: Wrong error message for selective import
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D1 (retired)
Hardware: All All
: P2 major
Assignee: No Owner
URL:
Keywords: accepts-invalid, diagnostic
Depends on:
Blocks:
 
Reported: 2012-01-31 08:36 UTC by Leandro Lucarella
Modified: 2019-11-30 09:19 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Leandro Lucarella 2012-01-31 08:36:54 UTC
/tmp$ cat -n a.d 
     1	module a;
     2	alias int type;
/tmp$ cat -n b.d 
     1	module b;
     2	private import a;
/tmp$ cat -n c.d 
     1	module c;
     2	private import b : type;
     3	type x;
/tmp$ dmd -c c.d
c.d(3): Error: undefined identifier type

The error should be reported at line 2 saying that the symbol type is private to module b or something like that.
Comment 1 John Colvin 2016-08-27 12:14:26 UTC
This now compiles without an error, which definitely shouldn't happen!
Comment 2 John Colvin 2016-08-27 12:15:28 UTC
just seen that this was a d1 bug, Should I bump it to d2 seeing as there's still a problem, or open a new one?
Comment 3 RazvanN 2018-01-26 11:11:23 UTC
This PR [1] fixes the issue for D2. As D1 is not maintained anymore should we close this?

[1] https://github.com/dlang/dmd/pull/7760
Comment 4 RazvanN 2019-11-30 09:19:30 UTC
As D1 is not maintained and the bug does not manifest in D2, I'm closing this as FIXED.