Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

alias this bypasses truncating conversion warning #19617

Open
dlangBugzillaToGithub opened this issue Sep 1, 2019 · 2 comments
Open

alias this bypasses truncating conversion warning #19617

dlangBugzillaToGithub opened this issue Sep 1, 2019 · 2 comments

Comments

@dlangBugzillaToGithub
Copy link

elpenguino+D reported this on 2019-09-01T08:46:13Z

Transferred from https://issues.dlang.org/show_bug.cgi?id=20187

CC List

  • RazvanN

Description

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.
@dlangBugzillaToGithub
Copy link
Author

razvan.nitu1305 commented on 2023-04-18T10:55:41Z

I get no warning whatsoever.

@dlangBugzillaToGithub
Copy link
Author

razvan.nitu1305 commented on 2023-04-18T10:56:44Z

Ah, forgot to add -unittest. Sorry, I can still reproduce this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant