7373 – (Regression git) Renamed imports conflict with other implicitly imported symbols

D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 7373 - (Regression git) Renamed imports conflict with other implicitly imported symbols
Summary: (Regression git) Renamed imports conflict with other implicitly imported symbols
Status: RESOLVED FIXED
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D1 (retired)
Hardware: x86 Linux
: P2 regression
Assignee: No Owner
URL:
Keywords: rejects-valid
Depends on:
Blocks:
Reported: 2012年01月26日 10:40 UTC by Leandro Lucarella
Modified: 2012年01月30日 03:11 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 Leandro Lucarella 2012年01月26日 10:40:22 UTC
This is how to reproduce the regression:
 echo 'module m1; struct S {}' > m1.d
 echo 'module m2; struct S {}' > m2.d
 echo 'module m3; import m1; import S = m2; S.S s;' > m3.d
 dmd -c m3.d
This works without the fix, but with the fix I get this errors:
 m3.d(1): Error: m1.S at m1.d(1) conflicts with m2 at m3.d(1)
 m3.d(1): Error: no property 'S' for type 'S'
 m3.d(1): Error: S.S is used as a type
 m3.d(1): Error: variable m3.s voids have no value
The only important is the first one. If you change m3 like this it works again:
 echo 'module m3; import m1; import X = m2; alias X S; S.S s;' > m3.d
 ^ ^^^^^^^^^
A git bisect show this commit as the one introducing the regression:
merge D2 pull 591 (93a643aba6f62db1b7658c2bfb51f9d0b576c337)
https://github.com/D-Programming-Language/dmd/commit/93a643aba6f62db1b7658c2bfb51f9d0b576c337
https://github.com/D-Programming-Language/dmd/pull/591 
Comment 1 github-bugzilla 2012年01月29日 22:01:25 UTC
Commit pushed to dmd-1.x at https://github.com/D-Programming-Language/dmd
https://github.com/D-Programming-Language/dmd/commit/b530cf8c079d559b6b6d12354c30dddfdb87f92b
fix Issue 7373 - (Regression git) Renamed imports conflict with other implicitly imported symbols
Comment 2 github-bugzilla 2012年01月29日 22:02:43 UTC
Commit pushed to master at https://github.com/D-Programming-Language/dmd
https://github.com/D-Programming-Language/dmd/commit/df5d8faabd26f248b6c25ae81daf73fff3814f41
fix Issue 7373 - (Regression git) Renamed imports conflict with other implicitly imported symbols
Comment 3 Leandro Lucarella 2012年01月30日 03:11:07 UTC
Thanks for the fix.
Maybe it would be a good idea to add the test case to the test suite to make sure this will never break again.


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