https://issues.dlang.org/show_bug.cgi?id=14780
Issue ID: 14780
Summary: Non-intuitive behavior for pointers to aggregates
defining opSlice
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: enhancement
Priority: P1
Component: dmd
Assignee: [email protected]
Reporter: [email protected]
```
struct HasOpSlice
{
int opSlice() { return 10; }
}
void main()
{
HasOpSlice* pointer;
int i = pointer[];
}
```
test.d(9): Error: need upper and lower bound to slice pointer
I'd like for this to Just Work(tm). I don't have any good ideas for how to make
this behave consistently in the case that there's an opSlice that takes two
arguments.
--