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

           Summary: Bad error message when trying to use this in a static
                    member function of a struct
           Product: D
           Version: unspecified
          Platform: Other
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nob...@puremagic.com
        ReportedBy: arse...@rpi.edu


--- Comment #0 from Matt Arsenault <arse...@rpi.edu> 2011-12-29 08:46:55 PST ---
Created an attachment (id=1059)
Example of bad + good error

When attempting to use 'this' in a static member function on a struct, the
error message is not helpful.

bad_error_static_this_struct.d(13): Error: need 'this' to access member x

However if the same declaration is made to be 'class' the error is much more
appropriate:

bad_error_static_this_struct.d(25): Error: 'this' is only defined in non-static
member functions, not comparex

Attached is an example.

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

Reply via email to