Thread overview | ||||||||
---|---|---|---|---|---|---|---|---|
|
November 09, 2004 Internal error: e2ir.c 814 - calling ClassName.nonStaticMemberName from static method | ||||
---|---|---|---|---|
| ||||
Using DMD 0.105, Windows 98SE. ---------- class Qwert { int yuiop; static int asdfg() { return Qwert.yuiop() + 105; } } ---------- Internal error: e2ir.c 814 ---------- Surely the error should say "need 'this' to access member yuiop" or something along those lines. The same happens if yuiop is a method, or even a case of the 'deprecated attribute overrides static block' bug. Stewart. |
November 09, 2004 Re: Internal error: e2ir.c 814 - calling ClassName.nonStaticMemberName | ||||
---|---|---|---|---|
| ||||
Posted in reply to Stewart Gordon | In article <cmq656$5rn$2@digitaldaemon.com>, Stewart Gordon says... > >Using DMD 0.105, Windows 98SE. > >---------- >class Qwert { > int yuiop; > > static int asdfg() { > return Qwert.yuiop() + 105; > } >} >---------- >Internal error: e2ir.c 814 >---------- > >Surely the error should say "need 'this' to access member yuiop" or something along those lines. > >The same happens if yuiop is a method, or even a case of the 'deprecated attribute overrides static block' bug. > >Stewart. I'm not sure it's an error on D. I think it's an error but I think Walter doesn't think it's an error. for sure using the relatively new typeof(this) will get to the static members (does it?) unfortunatly http://www.digitalmars.com/d/class.html doesn't clarify it. Ant |
November 17, 2004 Re: Internal error: e2ir.c 814 - calling ClassName.nonStaticMemberName | ||||
---|---|---|---|---|
| ||||
Posted in reply to Ant | On Tue, 9 Nov 2004 13:27:36 +0000 (UTC), Ant <Ant_member@pathlink.com> wrote: > In article <cmq656$5rn$2@digitaldaemon.com>, Stewart Gordon says... >> >> Using DMD 0.105, Windows 98SE. >> >> ---------- >> class Qwert { >> int yuiop; >> >> static int asdfg() { >> return Qwert.yuiop() + 105; >> } >> } >> ---------- >> Internal error: e2ir.c 814 >> ---------- >> >> Surely the error should say "need 'this' to access member yuiop" or >> something along those lines. >> >> The same happens if yuiop is a method, or even a case of the 'deprecated >> attribute overrides static block' bug. >> >> Stewart. > > I'm not sure it's an error on D. > I think it's an error but I think Walter doesn't think it's an error. > > for sure using the relatively new typeof(this) will get to the static members > (does it?) > unfortunatly http://www.digitalmars.com/d/class.html doesn't clarify it. > > Ant > > I'm certain all internal errors are bugs in dmd/phobos. Walter loves really helpful names like e2ir for his symbols. -- Using Opera's revolutionary e-mail client: http://www.opera.com/m2/ |
November 17, 2004 Re: Internal error: e2ir.c 814 - calling ClassName.nonStaticMemberName | ||||
---|---|---|---|---|
| ||||
Posted in reply to Ant | Ant wrote: > In article <cmq656$5rn$2@digitaldaemon.com>, Stewart Gordon says... > >> Using DMD 0.105, Windows 98SE. >> >> ---------- >> class Qwert { >> int yuiop; >> >> static int asdfg() { >> return Qwert.yuiop() + 105; >> } >> } <snip> > I'm not sure it's an error on D. > I think it's an error but I think Walter doesn't think it's an error. What do you think Walter thinks it's supposed to mean? Anyway, I'm told the bug's been fixed now. > for sure using the relatively new typeof(this) will get to the static members (does it?) As will specifying the class name, or using the member name by itself if within the class scope. But nobody's trying to get to a static member here, so what's it to do with anything? Stewart. |
Copyright © 1999-2021 by the D Language Foundation