www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - Type Inference class conflict

reply Derek Parnell <derek psych.ward> writes:
The file 'test.d' ...

 class C { }
 static x = 3;
 void main()
 {
 }


compiled with "dmd test.d"

gives this message...

 test.d(1): class test.C conflicts with test.C at test.d(1)


-- 
Derek
(skype: derek.j.parnell)
Melbourne, Australia
25/10/2005 2:07:34 PM
Oct 24 2005
parent "Walter Bright" <newshound digitalmars.com> writes:
"Derek Parnell" <derek psych.ward> wrote in message
news:cmtlg0rbc8b2$.1pvgdsvt1kvww$.dlg 40tude.net...
 The file 'test.d' ...

  class C { }
  static x = 3;
  void main()
  {
  }


 compiled with "dmd test.d"

 gives this message...

  test.d(1): class test.C conflicts with test.C at test.d(1)

I thought I had tested that, but obviously not. Type inference doesn't (currently) work with global declarations. It'll be fixed in the next update.
Oct 25 2005