| 1 |
/* |
| 2 |
TEST_OUTPUT: |
| 3 |
--- |
| 4 |
fail_compilation/ice13081.d(17): Error: undefined identifier `node` |
| 5 |
fail_compilation/ice13081.d(17): Error: undefined identifier `data` |
| 6 |
fail_compilation/ice13081.d(17): Error: undefined identifier `node` |
| 7 |
fail_compilation/ice13081.d(28): Error: template instance `ice13081.Cube!(SparseDataStore)` error instantiating |
| 8 |
--- |
| 9 |
*/ |
| 10 |
|
| 11 |
struct Cube(StorageT) |
| 12 |
{ |
| 13 |
StorageT datastore; |
| 14 |
alias datastore this; |
| 15 |
auto seed() |
| 16 |
{ |
| 17 |
this[] = node.data ? data : node.data; |
| 18 |
} |
| 19 |
} |
| 20 |
|
| 21 |
class SparseDataStore |
| 22 |
{ |
| 23 |
auto opSlice() {} |
| 24 |
} |
| 25 |
|
| 26 |
void main() |
| 27 |
{ |
| 28 |
Cube!SparseDataStore c; |
| 29 |
} |