@@ -1018,10 +1018,7 @@ $(H3 $(LNAME2 cast_expressions, Cast Expressions))
1018
1018
$(GRAMMAR
1019
1019
$(GNAME CastExpression):
1020
1020
$(D cast $(LPAREN)) $(GLINK2 type, Type) $(D $(RPAREN)) $(GLINK UnaryExpression)
1021
- $(I CastQual)
1022
-
1023
- $(GNAME CastQual):
1024
- $(D cast $(LPAREN)) $(GLINK2 type, TypeCtors)$(OPT) $(D $(RPAREN)) $(GLINK UnaryExpression)
1021
+ $(GLINK CastQual)
1025
1022
)
1026
1023
1027
1024
$(P A $(I CastExpression) converts the $(I UnaryExpression)
@@ -1184,8 +1181,13 @@ $(H3 $(LNAME2 cast_struct, Struct))
1184
1181
1185
1182
$(H3 $(LNAME2 cast_qualifier, Qualifier Cast))
1186
1183
1187
- $(P Casting to a $(GLINK CastQual) replaces the qualifiers to the type of
1188
- the $(GLINK UnaryExpression).)
1184
+ $(GRAMMAR
1185
+ $(GNAME CastQual):
1186
+ $(D cast $(LPAREN)) $(GLINK2 type, TypeCtors)$(OPT) $(D $(RPAREN)) $(GLINK UnaryExpression)
1187
+ )
1188
+
1189
+ $(P A $(I CastQual) replaces the qualifiers in the type of
1190
+ the $(I UnaryExpression):)
1189
1191
1190
1192
---
1191
1193
shared int x;
@@ -1195,7 +1197,7 @@ $(H3 $(LNAME2 cast_qualifier, Qualifier Cast))
1195
1197
$(P Casting with no type or qualifiers removes
1196
1198
any top level $(D const), $(D immutable), $(D shared) or $(D inout)
1197
1199
type modifiers from the type
1198
- of the $(GLINK UnaryExpression).)
1200
+ of the $(I UnaryExpression).)
1199
1201
1200
1202
---
1201
1203
shared int x;
@@ -1206,13 +1208,13 @@ $(H3 $(LNAME2 cast_void, Casting to `void`))
1206
1208
1207
1209
$(P Casting an expression to $(D void) type is allowed to mark that
1208
1210
the result is unused. On $(GLINK2 statement, ExpressionStatement),
1209
- it could be used properly to avoid "has no effect" error.)
1211
+ it could be used properly to avoid a "has no effect" error.)
1210
1212
1211
1213
----
1212
1214
void foo(lazy void exp) {}
1213
1215
void main()
1214
1216
{
1215
- foo(10); // NG - has no effect in expression '10'
1217
+ foo(10); // NG - expression '10' has no effect
1216
1218
foo(cast(void)10); // OK
1217
1219
}
1218
1220
----
0 commit comments