[Issue 23234] Delegate literal with inferred return value that requires following alias-this uses class cast instead.

2022-08-31 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=23234 Nick Treleaven changed: What|Removed |Added CC||n...@geany.org --- Comment #9 from Nick

[Issue 23234] Delegate literal with inferred return value that requires following alias-this uses class cast instead.

2022-07-20 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=23234 Dlang Bot changed: What|Removed |Added Status|NEW |RESOLVED Resolution|---

[Issue 23234] Delegate literal with inferred return value that requires following alias-this uses class cast instead.

2022-07-13 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=23234 Dlang Bot changed: What|Removed |Added Keywords||pull --- Comment #7 from Dlang Bot ---

[Issue 23234] Delegate literal with inferred return value that requires following alias-this uses class cast instead.

2022-07-13 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=23234 --- Comment #6 from RazvanN --- Further investigation has shown that this bug report is indeed valid. It turns out that dmd does tweak the return type for delegates depending on context. This is surprising for me and maybe this should be documented

[Issue 23234] Delegate literal with inferred return value that requires following alias-this uses class cast instead.

2022-07-13 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=23234 --- Comment #5 from RazvanN --- Actually, looking at the internals, it seems that what should the compiler do is actually cast the entire delegate to `Bar delegate()` not the innards of the delegate. --

[Issue 23234] Delegate literal with inferred return value that requires following alias-this uses class cast instead.

2022-07-13 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=23234 --- Comment #4 from RazvanN --- This issue is invalid. The return type of a delegate should be decided based upon what the function returns, not on how the returned result is used. For example, consider this code: alias fd = () => foo; test(fd);

[Issue 23234] Delegate literal with inferred return value that requires following alias-this uses class cast instead.

2022-07-09 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=23234 --- Comment #3 from mhh --- I think I have a patch for this --

[Issue 23234] Delegate literal with inferred return value that requires following alias-this uses class cast instead.

2022-07-08 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=23234 RazvanN changed: What|Removed |Added CC||razvan.nitu1...@gmail.com

[Issue 23234] Delegate literal with inferred return value that requires following alias-this uses class cast instead.

2022-07-08 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=23234 --- Comment #2 from mhh --- OK so we do do that for implicit conversions it looks like --

[Issue 23234] Delegate literal with inferred return value that requires following alias-this uses class cast instead.

2022-07-08 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=23234 mhh changed: What|Removed |Added CC||maxha...@gmail.com --- Comment #1 from mhh ---

[Issue 23234] Delegate literal with inferred return value that requires following alias-this uses class cast instead.

2022-07-08 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=23234 Mario Kroeplin changed: What|Removed |Added Keywords||industry CC|