February 15, 2019 [Issue 19678] New: wrong error message with inout method | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=19678 Issue ID: 19678 Summary: wrong error message with inout method Product: D Version: D2 Hardware: x86_64 OS: Linux Status: NEW Severity: normal Priority: P1 Component: dmd Assignee: nobody@puremagic.com Reporter: thomas.bockman@gmail.com This is very similar to https://issues.dlang.org/show_bug.cgi?id=17518 . The code below should yield the same errors as it would without the `inout`: Error: function `bug.A.f(short x)` is not callable using argument types `(int)` cannot pass argument `cast(int)y + 1` of type `int` to parameter `short x` Instead I get this unhelpful nonsense: Error: `inout` method `bug.A.f` is not callable using a mutable object ////////////////////////////////// module bug; struct A { void f(short x) inout { } } void main() { short y = 5; A().f(y + 1); } -- |
Copyright © 1999-2021 by the D Language Foundation