digitalmars.D.bugs - [Issue 17600] New: implicit float->int cast using += operator
- via Digitalmars-d-bugs (22/22) Jul 05 2017 https://issues.dlang.org/show_bug.cgi?id=17600
https://issues.dlang.org/show_bug.cgi?id=17600 Issue ID: 17600 Summary: implicit float->int cast using += operator Product: D Version: D2 Hardware: x86_64 OS: Linux Status: NEW Severity: normal Priority: P1 Component: dmd Assignee: nobody puremagic.com Reporter: simon.buerger rwth-aachen.de The following code should not compile but it does, using an implicit cast that should not be allowed. void main() { int x; float y; x += y; // implicitly casts y to int ! } --
Jul 05 2017