Fails with: t.d(34): Error: need 'this' for 'opCall' of type 'int()' Also opCall seems to be required to create a range. class Test { int opCall() { return 1; } @property int front() { return 2; } void popFront() { } @property bool empty() { return false; } }; void main(){ ubyte [] p1; Test(); }