www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 7253] New: Bad error message when symbol is not found in selective import

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=7253

           Summary: Bad error message when symbol is not found in
                    selective import
           Product: D
           Version: D1
          Platform: x86
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: leandro.lucarella sociomantic.com


--- Comment #0 from Leandro Lucarella <leandro.lucarella sociomantic.com>
2012-01-09 08:42:28 PST ---
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

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jan 09 2012
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=7253



--- Comment #1 from Leandro Lucarella <leandro.lucarella sociomantic.com>
2012-01-09 08:44:44 PST ---
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

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jan 09 2012
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=7253



--- Comment #2 from Leandro Lucarella <leandro.lucarella sociomantic.com>
2012-01-09 09:23:40 PST ---
Fix for the second bullet only:

https://github.com/D-Programming-Language/dmd/pull/614

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jan 09 2012
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=7253


bearophile_hugs eml.cc changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bearophile_hugs eml.cc


--- Comment #3 from bearophile_hugs eml.cc 2012-01-09 09:42:07 PST ---
See also bug 4563

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jan 09 2012
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=7253


Leandro Lucarella <leandro.lucarella sociomantic.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |DUPLICATE


--- Comment #4 from Leandro Lucarella <leandro.lucarella sociomantic.com>
2012-01-10 04:40:42 PST ---
*** This issue has been marked as a duplicate of issue 4563 ***

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jan 10 2012
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=7253



--- Comment #5 from Leandro Lucarella <leandro.lucarella sociomantic.com>
2012-01-10 04:43:52 PST ---
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... -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Jan 10 2012