File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -1191,20 +1191,24 @@ $(GNAME CastQual):
1191
1191
$(P A $(I CastQual) replaces the qualifiers in the type of
1192
1192
the $(I UnaryExpression):)
1193
1193
1194
+ $(SPEC_RUNNABLE_EXAMPLE_COMPILE
1194
1195
---
1195
1196
shared int x;
1196
- assert(is(typeof(cast(const)x) == const int));
1197
+ static assert(is(typeof(cast(const)x) == const int));
1197
1198
---
1199
+ )
1198
1200
1199
1201
$(P Casting with no type or qualifiers removes
1200
1202
any top level $(D const), $(D immutable), $(D shared) or $(D inout)
1201
1203
type modifiers from the type
1202
1204
of the $(I UnaryExpression).)
1203
1205
1206
+ $(SPEC_RUNNABLE_EXAMPLE_COMPILE
1204
1207
---
1205
1208
shared int x;
1206
- assert(is(typeof(cast()x) == int));
1209
+ static assert(is(typeof(cast()x) == int));
1207
1210
---
1211
+ )
1208
1212
1209
1213
$(H3 $(LNAME2 cast_void, Casting to `void`))
1210
1214
You can’t perform that action at this time.
0 commit comments