File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -662,10 +662,20 @@ $(P Applying a qualifier to a type that already has that qualifier is legal but
662662has no effect, e.g. given an unqualified type `T`, $(D shared(const shared T))
663663yields the type $(D const shared T).)
664664
665- $(P Applying the `immutable` qualifier to any type (qualified or not) results in
665+ $(PANEL Applying the `immutable` qualifier to any type (qualified or not) results in
666666$(D immutable T). Applying any qualifier to $(D immutable T) results in
667667`immutable T`. This makes `immutable` a fixed point of qualifier combinations and
668- makes types such as $(D const(immutable(shared T))) impossible to create.)
668+ makes types such as $(D const(immutable(shared T))) impossible to create.
669+
670+ $(SPEC_RUNNABLE_EXAMPLE_COMPILE
671+ ---
672+ alias SInt = shared int;
673+ alias IInt = immutable int;
674+ static assert(is(immutable(SInt) == IInt));
675+ static assert(is(shared(IInt) == IInt));
676+ ---
677+ )
678+ )
669679
670680$(P Assuming `T` is an unqualified type, the graph below illustrates how
671681qualifiers combine (combinations with `immutable` are omitted). For each node,
You can’t perform that action at this time.
0 commit comments