[Issue 3345] Static and nonstatic methods with the same name should be allowed
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu Jul 29 14:06:25 UTC 2021
https://issues.dlang.org/show_bug.cgi?id=3345
--- Comment #12 from Max Samukha <maxsamukha at gmail.com> ---
(In reply to Basile-z from comment #11)
> I'm not 100% sure of what I will say but I would say that it's not really
> "broken", rather that "it's pragmatically adapted to closures". You see, a
> kind of tradeoff.
I understand it was an attempt at pragmatism, but the type system is still
broken.
struct S {
void foo() {
x = 1;
}
int x;
}
void main() {
void function() f = &S.foo; // this means "broken"
f(); // bang
}
--
More information about the Digitalmars-d-bugs
mailing list