www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 4335] New: Wrong suggestion in error (import std.stdio for writeln)

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

           Summary: Wrong suggestion in error (import std.stdio for
                    writeln)
           Product: D
           Version: D1
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: diagnostic
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: llucax gmail.com



PDT ---
I accidentally compiled some trivial D2 code with D1 and got a bad suggestion
from the compiler. Here is a trivial testcase:

---
import std.stdio;
void main() {
    writeln("bug");
}
---

t.d(3): Error: 'writeln' is not defined, perhaps you need to import std.stdio;
?
t.d(3): Error: function expected before (), not __error of type _error_

Both errors are really confusing. First, std.stdio is already imported (but D1
doesn't have writeln(), just writefln()). Then there is a crpyptic error about
things that are not even present in the file.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jun 16 2010
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=4335




PDT ---
BTW, using DMD 1.062. This should be a regression introduced by the suggestions
feature added in DMD 1.061.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jun 16 2010
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=4335


nfxjfg gmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |nfxjfg gmail.com
         Depends on|                            |4329



The second error is bug 4329.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jun 17 2010
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=4335


Don <clugdbug yahoo.com.au> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |clugdbug yahoo.com.au
         Resolution|                            |FIXED



Fixed in DMD1.066.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Feb 12 2011