[Issue 21862] Taking address of non-static method without "this" should not be allowed

2022-12-09 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=21862 RazvanN changed: What|Removed |Added Status|REOPENED|RESOLVED Resolution|---

[Issue 21862] Taking address of non-static method without "this" should not be allowed

2022-12-05 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=21862 --- Comment #4 from Eyal --- The type of a delegate's "funcptr" should either be a "void*" or a new kind of non-callable "ret delegatefuncptr(args)" type. That will allow everything correct to happen while making the incorrectly typed programs at

[Issue 21862] Taking address of non-static method without "this" should not be allowed

2022-12-05 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=21862 --- Comment #3 from RazvanN --- (In reply to Eyal from comment #2) > Why would you take the function ptr of a delegate without the ctx, except as > a "void*" value to compare against? > > A delegate's function ptr is *not* callable without the

[Issue 21862] Taking address of non-static method without "this" should not be allowed

2022-12-05 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=21862 Eyal changed: What|Removed |Added Status|RESOLVED|REOPENED Resolution|WONTFIX

[Issue 21862] Taking address of non-static method without "this" should not be allowed

2022-12-05 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=21862 --- Comment #2 from Eyal --- Why would you take the function ptr of a delegate without the ctx, except as a "void*" value to compare against? A delegate's function ptr is *not* callable without the context, so it should not have the type of

[Issue 21862] Taking address of non-static method without "this" should not be allowed

2022-12-05 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=21862 RazvanN changed: What|Removed |Added Status|NEW |RESOLVED CC|