[Issue 2788] New: return val not passable via ref const in other method
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu Apr 2 19:00:14 PDT 2009
http://d.puremagic.com/issues/show_bug.cgi?id=2788
Summary: return val not passable via ref const in other method
Product: D
Version: 2.027
Platform: PC
OS/Version: Windows
Status: NEW
Keywords: rejects-valid
Severity: normal
Priority: P2
Component: DMD
AssignedTo: bugzilla at digitalmars.com
ReportedBy: spam at extrawurst.org
This used work perfectly fine, why not anymore ? (since 2.027)
[CODE]
int getVar()
{
return 2;
}
void foo(ref const int _p)
{}
void main()
{
foo(getVar());
}
[/CODE]
Error: function main.foo (ref const const(int) _p) does not match parameter
types (int)
Error: getVar() is not an lvalue
--
More information about the Digitalmars-d-bugs
mailing list