https://issues.dlang.org/show_bug.cgi?id=13574
Kenji Hara <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |accepts-invalid, pull Hardware|x86_64 |All OS|Linux |All --- Comment #2 from Kenji Hara <[email protected]> --- I think the "$' should be handled as an rvalue, therefoe $ should not be assignable. I think this is not only an issue for opDollar, but also for dynamic arrays. void main() { int[] arr = [1,2,3]; auto x = arr[0 .. arr.length = 1]; assert(arr.length == 1); auto y = arr[0 .. $ = 2]; assert(arr.length != 2 && arr.length == 1); // pass } It's weird behavior, so I think all $ should not be assignable. Compiler fix: https://github.com/D-Programming-Language/dmd/pull/4045 --
