Bug 7253 – Bad error message when symbol is not found in selective import
Status
RESOLVED
Resolution
DUPLICATE
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D1 (retired)
Platform
x86
OS
Linux
Creation time
2012-01-09T08:42:00Z
Last change time
2012-01-10T04:43:52Z
Keywords
diagnostic
Assigned to
nobody
Creator
leandro.lucarella
Comments
Comment #0 by leandro.lucarella — 2012-01-09T08:42:28Z
Test case (tested only in DMD 1.071):
---
touch m1.d
echo 'import m1 : non_exitent_symbol;' > m2.d
dmd -c m2.d
m2.d(1): Error: import __anonymous non_exitent_symbol not found
m2.d(1): Error: alias m2.non_exitent_symbol recursive alias declaration
---
Various things can be improved here:
* __anonymous should be m1
* Could be better phrased, something like: symbol 'non_exitent_symbol' not found in module 'm1'
* The second error looks bogus, should probably be removed
Comment #1 by leandro.lucarella — 2012-01-09T08:44:44Z
More information about the __annonymous thing: is produced by Import::addAlias:
if (!aliasId)
this->ident = NULL; // make it an anonymous import
I don't know why is that there, I guess there is a reason, otherwise it should be easy to fix :P
Comment #2 by leandro.lucarella — 2012-01-09T09:23:40Z
Comment #3 by bearophile_hugs — 2012-01-09T09:42:07Z
See also bug 4563
Comment #4 by leandro.lucarella — 2012-01-10T04:40:42Z
*** This issue has been marked as a duplicate of issue 4563 ***
Comment #5 by leandro.lucarella — 2012-01-10T04:43:52Z
OK, I marked this bug as a duplicate of that on(In reply to comment #3)
> See also bug 4563
They are the same bug, so I marked this as a duplicate of that, I didn't found it when I reported this one.
The patch should be completely outdated then, so I'll remove the pull request too...