April 24, 2004 [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. |
Copyright © 1999-2021 by the D Language Foundation