[Issue 8270] New: Different error messages for missing const in var[] and var.opSlice()
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Jun 20 01:17:39 PDT 2012
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: nobody at puremagic.com
ReportedBy: xammy at xammy.homelinux.net
--- Comment #0 from Matthias Walter <xammy at 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: -------
More information about the Digitalmars-d-bugs
mailing list