Bug 20187 – alias this bypasses truncating conversion warning

Status
REOPENED
Severity
normal
Priority
P3
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2019-09-01T08:46:13Z
Last change time
2024-12-13T19:05:23Z
Keywords
bootcamp, diagnostic
Assigned to
No Owner
Creator
elpenguino+D
Moved to GitHub: dmd#19617 →

Comments

Comment #0 by elpenguino+D — 2019-09-01T08:46:13Z
Compile with -w: ``` unittest { struct X { long y; alias y this; } X x; x -= 1.0; //No warning x.y -= 1.0; //Warning } ``` Only one warning is triggered, when two should be.
Comment #1 by razvan.nitu1305 — 2023-04-18T10:55:41Z
I get no warning whatsoever.
Comment #2 by razvan.nitu1305 — 2023-04-18T10:56:44Z
Ah, forgot to add -unittest. Sorry, I can still reproduce this.
Comment #3 by robert.schadek — 2024-12-13T19:05:23Z
THIS ISSUE HAS BEEN MOVED TO GITHUB https://github.com/dlang/dmd/issues/19617 DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB