// REQUIRED_ARGS: -inline struct Nested { int _val; } struct S { Nested _nested; alias _nested this; void set(int v) { assign(v); } void assign(int v) { _val = v; } } ---- Note that this does not happen when the definition of assign comes lexically before set. So the issue appears to be an alias this access when inlining a function that was forward referenced. This is probably related to http://d.puremagic.com/issues/show_bug.cgi?id=2962.
Here's another way to reproduce the same failure: int expression( string op, Lhs, Rhs ) ( auto ref Lhs lhs, auto ref Rhs rhs ) { return 0; } struct BasicMatrix( Storage_ ) { auto opBinary( string op, NewRhs )( auto ref NewRhs newRhs ) { alias this thisConverted; return expression!op( thisConverted, newRhs ); } } void ridgeLargeP() { BasicMatrix!double cwc; auto foo = cwc * cwc; }
*** Issue 7082 has been marked as a duplicate of this issue. ***
Both tests pass and run with or without -inline
(In reply to comment #3) > Both tests pass and run with or without -inline On 2.059 Win32
Should be closed FIXED.