www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 11031] New: Simple member function being skipped over

http://d.puremagic.com/issues/show_bug.cgi?id=11031

           Summary: Simple member function being skipped over
           Product: D
           Version: unspecified
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: VisualD
        AssignedTo: nobody puremagic.com
        ReportedBy: r.sagitario gmx.de



PDT ---
original report: http://www.dsource.org/projects/visuald/ticket/173

reported 11/29/12 20:48:51 by Anonymous for version 0.3.34
bug in Debugger

I have a very simple class(just a test class) with a method called SetValue?.
when I try to debug it the the function is skipped over. I can enter a
different function but not that one. 
module main;
import std.stdio;
class A(T)
{

    public:           



        T Value;
        this() { }




        void SetValue?(T value)
        {

            Value = value;        

        }          



}

int main(string[] argv)
{

    auto l1 = new A!int();
    auto l2 = new A!double();
    l1.SetValue?(0);
    l2.SetValue?(0);
    writeln(l1.Value, ", ", l2.Value);


    getchar();
    return 0;

}
(I'm on the debug build and when I debug it the current cursor line in the
editor jumps to the bottom of the code. I can step through the code using F11
so it seems it is a line numbering issue. (Visual D not reporting the correct
line number or something?)) It does not do it with all functions but just this
one in particular in my case)

Comment 1: 12/01/12 02:58:53  by sagitario

What compiler and architecture are you using? My guess is that this is
dmd/win64. dmd/win32 has the problem not to emit correct line number info for
the last instructions in a compilation unit (that's fixed during the cv2pdb
conversion for win32). 
Your template function will be appended to the end of the module, so it might
suffer from this issue. If this is actually dmd/win64, it is a dmd bug.

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