http://d.puremagic.com/issues/show_bug.cgi?id=4818
Summary: Taking address of shared member function -> unshared
delegate
Product: D
Version: D2
Platform: Other
OS/Version: Windows
Status: NEW
Severity: normal
Priority: P2
Component: DMD
AssignedTo: [email protected]
ReportedBy: [email protected]
--- Comment #0 from David Simcha <[email protected]> 2010-09-05 08:34:42 PDT ---
class Foo {
shared void bar() {}
}
void main() {
shared(void delegate()) d;
auto foo = new Foo;
d = &foo.bar;
}
class Foo {
shared void bar() {}
}
void main() {
shared(void delegate()) d;
auto foo = new Foo;
d = &foo.bar;
}
Error: cannot implicitly convert expression (&foo.bar) of type void
delegate() to shared(void delegate())
But this compiles:
class Foo {
void bar() {}
}
void main() {
shared(void delegate()) d;
auto foo = new Foo;
d = &foo.bar;
}
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------