File tree Expand file tree Collapse file tree 1 file changed +2
-8
lines changed Expand file tree Collapse file tree 1 file changed +2
-8
lines changed Original file line number Diff line number Diff line change @@ -1037,11 +1037,6 @@ $(H3 $(GNAME parameters))
1037
1037
$(P If the function is nested, the parameters returned are those of the
1038
1038
inner function, not the outer one.)
1039
1039
1040
- $(P When used inside a $(DDSUBLINK spec/statement, foreach-statement,
1041
- `foreach` statement) that calls an $(DDSUBLINK spec/statement,
1042
- foreach_over_struct_and_classes, `opApply` overload), the parameters
1043
- returned are those of the delegate passed to `opApply`.)
1044
-
1045
1040
---
1046
1041
int add(int x, int y)
1047
1042
{
@@ -1083,13 +1078,12 @@ $(H3 $(GNAME parameters))
1083
1078
{
1084
1079
foreach(idx; 0..5)
1085
1080
{
1086
- // foreach does not call opApply
1087
1081
static assert(is(typeof(__traits(parameters)) == AliasSeq!(C, int)));
1088
1082
}
1089
1083
foreach(idx, elem; c)
1090
1084
{
1091
- // foreach calls opApply
1092
- static assert(is(typeof(__traits(parameters)) == AliasSeq!(size_t, C )));
1085
+ // __traits(parameters) sees past the delegate passed to opApply
1086
+ static assert(is(typeof(__traits(parameters)) == AliasSeq!(C, int )));
1093
1087
}
1094
1088
}
1095
1089
---
You can’t perform that action at this time.
0 commit comments