www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 9768] New: No line number for wrong foreach type

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

           Summary: No line number for wrong foreach type
           Product: D
           Version: D2
          Platform: x86
        OS/Version: Windows
            Status: NEW
          Keywords: diagnostic
          Severity: major
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: bearophile_hugs eml.cc


--- Comment #0 from bearophile_hugs eml.cc 2013-03-20 17:13:42 PDT ---
This is a wrong program:


import std.typecons: Tuple;
void main() {
    Tuple!(string, int)[] data;
    foreach (string first, second; data) {}
}



DMD 2.063alpha gives an error with no line number:

Error: cannot implicitly convert expression (0) of type int to string
test.d(4): Error: incompatible types for ((__key1671) < (__aggr1672.length)):
'string' and 'uint'
test.d(4): Error: '__key1671 += 1' is not a scalar, it is a string
test.d(4): Error: incompatible types for ((__key1671) += (1)): 'string' and
'int'
test.d(4): Error: cannot implicitly convert expression (__key1671) of type
string to uint


(Tagged with major priority according to a request by Don for errors with no
line number.)

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Mar 20 2013
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=9768


Henning Pohl <henning still-hidden.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |pull
                 CC|                            |henning still-hidden.de


--- Comment #1 from Henning Pohl <henning still-hidden.de> 2013-05-07 12:23:43
PDT ---
https://github.com/D-Programming-Language/dmd/pull/1974

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
May 07 2013
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=9768



--- Comment #2 from github-bugzilla puremagic.com 2013-05-07 14:08:35 PDT ---
Commit pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/0a68d42192ee338b751c10609264658b9bcd0056
fix issue 9768 - No line number for wrong foreach type

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
May 07 2013
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=9768


bearophile_hugs eml.cc 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: -------
May 07 2013