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

           Summary: Different error messages for missing const in var[]
                    and var.opSlice()
           Product: D
           Version: D2
          Platform: All
        OS/Version: Linux
            Status: NEW
          Severity: minor
          Priority: P2
         Component: DMD
        AssignedTo: nob...@puremagic.com
        ReportedBy: xa...@xammy.homelinux.net


--- Comment #0 from Matthias Walter <xa...@xammy.homelinux.net> 2012-06-20 
01:19:59 PDT ---
Consider the following code:

struct S
{
  void opSlice() { }
}

void main()
{
  const(S) s;
  s[];
  s.opSlice();
}

It results in two error messages from which the second is correct since it
comlains about opSlice not being const but s being a const(S). The first one
misses this information.

Error: function main.S.opSlice () is not callable using argument types ()
Error: function main.S.opSlice () is not callable using argument types () const

This bug does not seem to affect other operators like opIndex or opCall.

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

Reply via email to