Code:
-----
import std.experimental.typecons;
void main()
{
Final!(int[]) s; // s is a head const array...
s.length = 5; // look, ma! I modified the array!
assert(s.length == 5); // passes
//s.ptr = null; // does not compile
}
-----
Firstly, it's questionable whether modifying array length should be allowed under Final.
But secondly, if we're allowed to modify s.length then it's inconsistent to reject modifying s.ptr.
Comment #1 by robert.schadek — 2024-12-01T16:29:56Z