[Issue 15158] New: Better error message: "Property is not an lvalue, use 'ref' to make it so"
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Sun Oct 4 18:21:34 PDT 2015
https://issues.dlang.org/show_bug.cgi?id=15158
Issue ID: 15158
Summary: Better error message: "Property is not an lvalue, use
'ref' to make it so"
Product: D
Version: D2
Hardware: x86
OS: Mac OS X
Status: NEW
Severity: minor
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: eli at sternheim.com
The error message: "function tmp.s.l () is not callable using argument types
(int)" is not very informative. Instead the message should be "Property l is
not an lvalue. Use 'ref' to make it so"
Test case:
struct s {
long a;
//@property ref long l() {return a;}
@property long l() {return a;}
}
void main () {
auto s1=new s;
s1.l = 0;
}
--
More information about the Digitalmars-d-bugs
mailing list