You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sample:
struct X(Data)
{
Data d;
inout(Data)* foo(this This)() inout // line 4
{
return &d;
}
}
void main()
{
immutable x = X!double(5.9);
auto r = x.foo();
}
Result:
inouttest.d(4): Error: inout on return means inout must be on a parameter as well for immutable inout(double)*()
Clearly, inout is not applying to the function when it should. Removing "(this This)" fixes the problem
The text was updated successfully, but these errors were encountered:
Steven Schveighoffer (@schveiguy) reported this on 2014-05-23T22:45:40Z
Transferred from https://issues.dlang.org/show_bug.cgi?id=12793
CC List
Description
Sample: struct X(Data) { Data d; inout(Data)* foo(this This)() inout // line 4 { return &d; } } void main() { immutable x = X!double(5.9); auto r = x.foo(); } Result: inouttest.d(4): Error: inout on return means inout must be on a parameter as well for immutable inout(double)*() Clearly, inout is not applying to the function when it should. Removing "(this This)" fixes the problemThe text was updated successfully, but these errors were encountered: