View mode: basic / threaded / horizontal-split · Log in · Help
November 14, 2012
funky property error with assoc array
This fails to compile when accessing as m.pgoo() complaining
about postblit.
What is wrong with this?

Note: If I alias as array instead of map: alias const(X)[] Map;
it compiles fine.

Thanks
Dan
-----------------------------
struct X { this(this) {} }
alias const(X)[string] Map;
@property int pgoo(ref Map x) { return 3; }

void main() {
   Map m;
   pgoo(m);
   m.pgoo();
}
Top | Discussion index | About this forum | D home