[Issue 6999] New: parsing error for inout method/ wrong headergen
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Nov 23 18:15:36 PST 2011
http://d.puremagic.com/issues/show_bug.cgi?id=6999
Summary: parsing error for inout method/ wrong headergen
Product: D
Version: D2
Platform: Other
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: dawg at dawgfoto.de
--- Comment #0 from dawg at dawgfoto.de 2011-11-23 18:14:40 PST ---
struct S
{
inout(int) foo() inout
{
return a;
}
int a;
}
---
// D import file generated from 'bug3.d'
struct S
{
inout inout(int) foo()
{
return a;
}
int a;
}
---
Compiling a method with 'inout inout(int) ident()'
will cause the following error.
Error: inout on return means inout must be on a parameter as well for
inout(int)()
It seems that the language requires the method attribute to follow
the parameter list.
http://www.d-programming-language.org/declaration.html#DeclaratorSuffix
But the header gen will output the inout in front of the return type.
The error message should be better in any case.
Probably related bug:
http://d.puremagic.com/issues/show_bug.cgi?id=6872
--
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