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); }
Regression since 2.062
This is fixed in master by : https://github.com/dlang/dmd/pull/9102 . Closing as fixed.
Yes, I can confirm this is fixed in nightly. Thanks!