[Issue 7159] New: Forward reference when casting auto return method
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Fri Dec 23 06:02:16 PST 2011
http://d.puremagic.com/issues/show_bug.cgi?id=7159
Summary: Forward reference when casting auto return method
Product: D
Version: D2
Platform: Other
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: robert at octarineparrot.com
--- Comment #0 from Robert Clipsham <robert at octarineparrot.com> 2011-12-23 14:02:12 GMT ---
The following:
----
class HomeController {
void* foo() {
return cast(void*)&HomeController.displayDefault;
}
auto displayDefault() {
return 1;
}
}
----
Gives the error:
----
merge.d(3): Error: forward reference to this.HomeController.displayDefault
----
When compiled with dmd 2.057 on ubuntu 32. Changing the return type of
displayDefault to anything other than auto fixes the error. Possibly related to
http://d.puremagic.com/issues/show_bug.cgi?id=5933
--
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