www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 6391] New: Line-less error when passing the '.im' of floating pointer value by reference

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

           Summary: Line-less error when passing the '.im' of floating
                    pointer value by reference
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: diagnostic
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: kennytm gmail.com



Test case:

----------------
void s6391(ref double x){}
void bug6391() {
    double d = 1;
    s6391(d.im);
}
----------------
x.d(4): Error: function x.s6391 (ref double x) is not callable using argument
types (double)
Error: 0 is not an lvalue
----------------

With template methods, it becomes hard to trace back where is the cause of this
line-less error, e.g.

------------------------
void t6391(R)(ref R x){
    if (x.re > 0)
        t6391(x.im);
}
void bug6391b() {
    double d = 1;
    t6391(d);
}
------------------------
Error: 0 is not an lvalue                                              //
where?
x.d(7): Error: template instance x.t6391!(double) error instantiating  // why?
------------------------

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jul 27 2011
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=6391


Don <clugdbug yahoo.com.au> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |clugdbug yahoo.com.au
           Severity|normal                      |critical


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


ponce <aliloko gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |aliloko gmail.com



Fixed in https://github.com/D-Programming-Language/dmd/pull/790

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




Commit pushed to dmd-1.x at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/e46bd9c44efe1697fdd81eb4915224733f371a9e
fix Issue 6391 - Line-less error when passing the '.im' of floating pointer
value by reference

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


Walter Bright <bugzilla digitalmars.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |bugzilla digitalmars.com
         Resolution|                            |WORKSFORME



00:51:46 PDT ---
Works in 2.059.

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