On 06/03/18 17:00, Simen Kjærås wrote:
Interestingly, replacing 'const' with 'immutable' on fun gives a compilation error: "immutable function 'foo.__unittest_foo_1_0.S.fun' cannot access mutable data 'n'".

This just means it is completely and totally broken. Changing the "const" to "immutable" merely decreases the types that can be passed to the function. I see no case where it is legitimate for a const decoration to compile and an immutable one not.


Reply via email to