http://d.puremagic.com/issues/show_bug.cgi?id=3474



--- Comment #12 from Don <clugd...@yahoo.com.au> 2011-11-22 00:30:59 PST ---
(In reply to comment #11)
> With the recent patch this doesn't compile, is this expected?
> 
> 
> struct Foo {
>     int x;
>     alias x opDollar;
>     int opIndex(int k) { return x * k; }
> }
> void main() {
>     Foo f = Foo(7);
>     int x = f[$ - 5]; // Error: undefined identifier __dollar
>     assert(x == 2 * 7);
> }

Yes, it checks that opDollar is either a function or a template function.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------

Reply via email to