The following code raises an ambiguous reference to value
at compile time:
import flash.display.Sprite;
public class Main extends Sprite
{
private var _value : Number = 0.;
public function get value() : Number { return _value; }
private function set value(v : Number) : void { _value = v; }
public function Main() : void
{
value = 42.;
}
}
I suspect some kind of bug in the compiler, though I didn't actually read the ECMA standard.
Before someone asks those questions:
- Private setters do make sense.
- The ambiguity also exists with custom namespaces (which is the problem I'm facing).