digitalmars.D.learn - funky property error with assoc array
- Dan (16/16) Nov 14 2012 This fails to compile when accessing as m.pgoo() complaining
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(); }
Nov 14 2012