Skip to content

Commit

Permalink
fix Issue 6091 - [d-p-l.org] Description for 'Modifier casting' is mi…
Browse files Browse the repository at this point in the history
…sleading
  • Loading branch information
WalterBright committed Jan 21, 2012
1 parent 75e0330 commit fb90864
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions expression.dd
Original file line number Diff line number Diff line change
Expand Up @@ -927,13 +927,23 @@ void test() {
S(v)
---

$(P Casting to a $(GLINK CastQual) adds the qualifier to the type of
$(P Casting to a $(GLINK CastQual) replaces the qualifiers to the type of
the $(GLINK UnaryExpression).)

$(P Casting to the empty $(LPAREN) $(RPAREN) has the effect of removing
any top level $(B const) or $(B immutable) type modifiers from the type
---
shared int x;
assert(is(typeof(cast(const)x) == const int));
---

$(P Casting with no $(GLINK Type) or $(GLINK CastQual) removes
any top level $(B const), $(B immutable), $(B shared) or $(B inout)
type modifiers from the type
of the $(GLINK UnaryExpression).)

---
shared int x;
assert(is(typeof(cast()x) == int));
---

$(V2
<h2>Pow Expressions</h2>
Expand Down

0 comments on commit fb90864

Please sign in to comment.