February 15, 2005
gdc fails to compile this:

//-----------------------------------
class A
{
        static int foo() { return 0; }
}

class B:A
{
        void bar() { A.foo(); }   //fail.d:8
}
//-----------------------------------

$ gdc -c fail.d
fail.d:8: cannot use "this.A" as an expression

DMD 0.113 can compile it.
Using gdc 0.10 on cygwin (gcc 3.4.1)

_______________________
Carlos Santander Bernal
February 18, 2005
Carlos Santander B. wrote:

| gdc fails to compile this:
|
| //-----------------------------------
| class A
| {
|         static int foo() { return 0; }
| }
|
| class B:A
| {
|         void bar() { A.foo(); }   //fail.d:8
| }
| //-----------------------------------
|
| $ gdc -c fail.d
| fail.d:8: cannot use "this.A" as an expression
|
| DMD 0.113 can compile it.
| Using gdc 0.10 on cygwin (gcc 3.4.1)

Added to DStress as
http://dstress.kuehne.cn/run/static_29.d

Thomas