www.digitalmars.com         C & C++   DMDScript  

D - [BUG] Properties as ctor's argument

[code]
class A {
   int foo() { return 1; }
}

class B {
   this(int a) {}
}

void main() {
   A a = new A();
   B b = new B(a.foo); // error 'constructor this (int a) does not match 
argument types (int())'
}
[/code]

If replace a.foo with a.foo(), all works.
Apr 24 2004