[Issue 20920] Typedef!int + Typedef!int => int? is this a typedef overlook?

2023-10-29 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=20920

--- Comment #5 from mw  ---
wrong operation, this is for issue #24187

--


[Issue 20920] Typedef!int + Typedef!int => int? is this a typedef overlook?

2023-10-29 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=20920

--- Comment #4 from mw  ---
Created attachment 1896
  --> https://issues.dlang.org/attachment.cgi?id=1896=edit
reduced to 2 lines: s2.i

--


[Issue 20920] Typedef!int + Typedef!int => int? is this a typedef overlook?

2023-10-18 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=20920

--- Comment #3 from mw  ---
Comment on attachment 1894
  --> https://issues.dlang.org/attachment.cgi?id=1894
s7.i.gz attached. dmd s7.i shows the same error.

wrong operation, this is for issue #24187

--


[Issue 20920] Typedef!int + Typedef!int => int? is this a typedef overlook?

2023-10-18 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=20920

--- Comment #2 from mw  ---
Created attachment 1894
  --> https://issues.dlang.org/attachment.cgi?id=1894=edit
s7.i.gz attached. dmd s7.i shows the same error.

s7.i.gz attached.

dmd s7.i shows the same error.

--


[Issue 20920] Typedef!int + Typedef!int => int? is this a typedef overlook?

2022-12-17 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=20920

Iain Buclaw  changed:

   What|Removed |Added

   Priority|P1  |P2

--


[Issue 20920] Typedef!int + Typedef!int => int? is this a typedef overlook?

2020-06-11 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=20920

Steven Schveighoffer  changed:

   What|Removed |Added

 CC||schvei...@yahoo.com

--- Comment #1 from Steven Schveighoffer  ---
Typedef was meant to replace the deprecated typedef feature.

If you look at D1's spec https://digitalmars.com/d/1.0/type.html, it claims
that if two identical typedefs are the parameters to a binary arithmetic
operator, the result should be the same type.

This works today with enums as well. This should be how Typedef operates.

The solution may be tricky, because one has to define opBinary for the specific
type, but must forward to the base type if there is no match.

--