www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - Wrong error message

Hi,
DMD v0.125 on Windows XP:

class A
{
  B b;
  this(B b)
  {
    this.b = b;
  }
}
 
class B
{
  A a;
  this(A a)
  {
    this.a = a;
  }
}
 
class C
{
  const A varA = new A(varB);
  const B varB = new B(varA);
}

---

testClass.d(22): cannot implicitly convert expression (new B(varA)) of type B to
testClass.B

Ciao

---
http://www.mariottini.net/roberto/
May 27 2005