www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - deprecated attribute overrides static block

reply Stewart Gordon <smjg_1998 yahoo.com> writes:
Using DMD 0.105, Windows 98SE.

I don't know if this is just one case of a more general bug.  In this 
code sample, yuiop is static.  But DMD seems to think otherwise.

----------
class Qwert {
     static {
         deprecated int yuiop() {
             return 42;
         }
     }

     static deprecated int asdfg() {
         return yuiop() + 105;
     }
}
----------
test2 'asdfg'
D:\My Documents\Programming\D\Tests\bugs\dep_static.d(9): need 'this' to 
access member yuiop
----------

(Don't know what the first line of compiler output is about, but that's 
an aside.)

Stewart.
Nov 09 2004
parent Thomas =?UTF-8?B?S8O8aG5l?= <thomas-dloop kuehne.cn> writes:
Stewart Gordon schrieb am Dienstag, 9. November 2004 11:27:
 Using DMD 0.105, Windows 98SE.
 
 I don't know if this is just one case of a more general bug.  In this
 code sample, yuiop is static.  But DMD seems to think otherwise.
 
[snip] added to DStress: http://svn.kuehne.cn/dstress/run/static_17.d http://svn.kuehne.cn/dstress/run/static_18.d Thomas
Nov 09 2004