]>
Commit | Line | Data |
---|---|---|
b4c522fa IB |
1 | /* |
2 | TEST_OUTPUT: | |
3 | --- | |
5fee5ec3 IB |
4 | fail_compilation/ice12902.d(20): Error: variable `ice12902.main.__dollar` type `void` is inferred from initializer `s.opDollar()`, and variables cannot be of type `void` |
5 | fail_compilation/ice12902.d(20): Error: expression `s.opDollar()` is `void` and has no value | |
b4c522fa IB |
6 | --- |
7 | */ | |
8 | ||
9 | struct S | |
10 | { | |
11 | void opDollar() { } | |
12 | void opIndex() { } | |
13 | void opIndexAssign() { } | |
14 | void opSliceAssign() { } | |
15 | } | |
16 | ||
17 | void main() | |
18 | { | |
19 | S s; | |
20 | s[] = s[$]; | |
21 | } |