[dmd-beta] D 2.059 beta 4

Walter Bright walter at digitalmars.com
Mon Apr 9 13:59:55 PDT 2012


I believe the error message is correct.

On 4/9/2012 1:53 PM, Jesse Phillips wrote:
> I suppose this could be classified as a regression?
>
> Can't specify static field with 'this.'
>
> void main() {
> }
>
> class A {
>      static int a;
>
>      static void foo(int a) {
>          this.a = a;
>      }
> }
>
> test.d(8): Error: 'this' is only defined in non-static member functions, not foo
>
>


More information about the dmd-beta mailing list