December 12, 2010 Re: cannot make opDollar work | ||||
---|---|---|---|---|
| ||||
I think this might have been reported: http://d.puremagic.com/issues/show_bug.cgi?id=3474 On 12/12/10, spir <denis.spir@gmail.com> wrote: > Hello, > > Test case: > > struct S { > int[] ints; > int opDollar () {return this.ints.length;} > int opIndex (int i) {return this.ints[i];} > int[] opSlice (int i, int j) {return this.ints[i..j];} > } > > unittest { > S s = S([3,2,1]); > // _link_ error on each line: > // Error: undefined identifier __dollar > writeln(s[$-1]); > writeln(s[0..$]); > writeln(s[1..$-1]); > } > > Thank you, > Denis > -- -- -- -- -- -- -- > vit esse estrany ☣ > > spir.wikidot.com > > |
Copyright © 1999-2021 by the D Language Foundation