Is there any reason why implicit conversion from Foo to Thing is permitted in a regular method but not in a constructor?

Trying to figure out whether this is a bug or some sort of constructor-specific safety precaution.

struct Thing {
  Foo foo;
  alias foo this;
}

class Foo { }

class Bar {
  Thing thing;

  void fine() {
    thing = new Foo(); // ok
  }

  this() {
    thing = new Foo(); // nope!
  }
}

Reply via email to