Thread overview
[Issue 6699] New: More cases of __error in error messages
Sep 20, 2011
Don
Sep 21, 2011
Don
Feb 08, 2012
Don
Feb 09, 2012
Don
Feb 18, 2012
Walter Bright
Feb 18, 2012
Walter Bright
September 20, 2011
http://d.puremagic.com/issues/show_bug.cgi?id=6699

           Summary: More cases of __error in error messages
           Product: D
           Version: D1 & D2
          Platform: Other
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody@puremagic.com
        ReportedBy: clugdbug@yahoo.com.au


--- Comment #0 from Don <clugdbug@yahoo.com.au> 2011-09-20 05:07:38 PDT ---
From the test suite fail_compilation:

fail8, fail72, fail123 have bad error messages with __error.
fail10 has duplicated error msg
fail14 has an error with no line number

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
September 21, 2011
http://d.puremagic.com/issues/show_bug.cgi?id=6699



--- Comment #1 from Don <clugdbug@yahoo.com.au> 2011-09-21 04:00:25 PDT ---
From the test suite, fail228.d

int ToTypeString (T:int) ()
{
    return 1;
}

int ToTypeString (T:string) ()
{
    return 2;
}

static assert(ToTypeString!(localVariable)());
-------------------
fail228.d(12): Error: undefined identifier localVariable
fail228.d(12): Error: template fail228.ToTypeString(T : int) does not match any
function template declaration
fail228.d(12): Error: template fail228.ToTypeString(T : int) cannot deduce
templ
ate function from argument types !(_error_)()
fail228.d(12): Error: template instance ToTypeString!(_error_) errors
instantiat
ing template

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
February 08, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=6699


Don <clugdbug@yahoo.com.au> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |diagnostic


--- Comment #2 from Don <clugdbug@yahoo.com.au> 2012-02-08 13:42:36 PST ---
I created new bugs (bug 7465 and bug 7466) for the fail10 and fail14 cases.

Apart from the bug in comment1, which I will call case A, the other known instances of _error are:


// CASE B: from bug 6475 (and many other places)
alias int b6699;
alias b6699.x b6699a;
crash.d(2): Error: no property 'x' for type 'int'
crash.d(2): Error: alias crash.b6699a cannot alias an expression __error

// CASE C: from fail72
void bug6699()
{
    synchronized( foo )    {  }
}
crash.d(3): Error: undefined identifier foo
crash.d(3): Error: can only synchronize on class objects, not '_error_'

// CASE D: from fail8 and fail123.
struct Foo6699 { int x; }
enum Bar6699 : Foo6699 { a, b }
crash.d(3): Error: cannot implicitly convert expression (0) of type int to
Foo66
99
Error: no property 'max' for type 'Foo6699'
crash.d(3): Error: Integer constant expression expected instead of (__error) ==
(__error)

See also bug 7462, bug 5302, and bug 6796, which also have _error.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
February 09, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=6699


Don <clugdbug@yahoo.com.au> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|nobody@puremagic.com        |clugdbug@yahoo.com.au


--- Comment #3 from Don <clugdbug@yahoo.com.au> 2012-02-09 14:05:09 PST ---
I have moved case D into a new bug 7477, since it involves more thought (it isn't a simple error message issue).

I also add case E, which contains 3 more __error bugs:

class X : junk, junk2 {}
interface X2 : junk3 {}

crash.d(1): Error: undefined identifier junk
crash.d(1): Error: undefined identifier junk2
crash.d(1): Error: class crash.X base type must be class or interface, not
_error_
crash.d(1): Error: class crash.X base type must be interface, not _error_
crash.d(2): Error: undefined identifier junk3
crash.d(2): Error: interface crash.X2 base type must be interface, not _error_

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
February 18, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=6699


Walter Bright <bugzilla@digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bugzilla@digitalmars.com


--- Comment #4 from Walter Bright <bugzilla@digitalmars.com> 2012-02-17 23:06:22 PST ---
https://github.com/D-Programming-Language/dmd/pull/704

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
February 18, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=6699



--- Comment #5 from github-bugzilla@puremagic.com 2012-02-17 23:06:55 PST ---
Commit pushed to dmd-1.x at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/f81214cbdda5fe8080418e4ffed80a90f3c076fd fix issue 6699, fix issue 7462

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
February 18, 2012
http://d.puremagic.com/issues/show_bug.cgi?id=6699


Walter Bright <bugzilla@digitalmars.com> changed:

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


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