void main() { uint[][] foo = [[1, 2], [3, 4], [5, 6]]; immutable bar = foo.idup; } Compiler error: test.d(3): Error: undefined identifier module test.idup test.d(3): Error: function expected before (), not module test.idup of type void Of course, the compiler should not allow .idup to be applied to foo because, unless a deep copy were made, this would cause unsafe aliasing between mutable and immutable. However, a better error message might be a good thing.
*** Issue 6252 has been marked as a duplicate of this issue. ***
The error message is actually in there, it's just hidden by the hacky ufcs is implemented.
https://github.com/D-Programming-Language/dmd/pull/219
https://github.com/D-Programming-Language/dmd/commit/f6fe4cc94d3210e260905ddf4c56a332c3d4f961