January 31, 2004 [Bug]{low} Wrong error message | ||||
---|---|---|---|---|
| ||||
This error message: | test.d(8): 'this' is only allowed in non-static member functions is generated by this code: <Dcode> class Foo{ int value() { return 0; } } void main(){ int i; i=Foo.value; } </Dcode> But `value()' is a non-static member function. Shouldn't it read either: | 'this' is only allowed in static member functions or | no 'this' in non-static member functions or | non-static member function needs instantiation (of class) So long. |
Copyright © 1999-2021 by the D Language Foundation