D-Programming-Language/dmd — pull request #1560 by AndrejMitrovic (2013-01-27 05:44:42+00:00)
Title: Issue 9408 - Make invariant non-const by default and settable to const

http://d.puremagic.com/issues/show_bug.cgi?id=9408

This supersedes https://github.com/D-Programming-Language/dmd/pull/1073

I have two problems:

1) `storage_class` doesn't seem to be set when the qualifier is on the left-hand-side and it's `shared`, e.g.:

```D
class C
{
shared invariant()
{
}
}
```

It seems to work with `const` but not with `shared`, I don't know why it's not reflected in `storage_class`.

2) Do shared/immutable/etc qualifiers make sense? I've added a check in `semantic` to ensure the invariant is either const or non-const, but maybe such a limitation is superfluous.