www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - Internal error: e2ir.c 814 - calling ClassName.nonStaticMemberName

reply Stewart Gordon <smjg_1998 yahoo.com> writes:
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.
Nov 09 2004
parent reply Ant <Ant_member pathlink.com> writes:
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
Nov 09 2004
next sibling parent "Simon Buchan" <currently no.where> writes:
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/
Nov 17 2004
prev sibling parent Stewart Gordon <smjg_1998 yahoo.com> writes:
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.
Nov 17 2004