Comment #0 by thomas.bockman — 2019-02-15T10:43:35Z
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);
}
Comment #1 by razvan.nitu1305 — 2019-02-18T16:34:34Z
Regression since 2.062
Comment #2 by razvan.nitu1305 — 2019-02-19T09:56:16Z