// Test interception of protected assignments by the "assign" method class bar { protected var a; protected var b; } class foo(bar) { // This should produce an error on compilation operator := (prop, val) { switch (prop) { case public::a : self.(prop) = val; default : throw oadl::AccessCheck; } } } proc main() { var x = new foo(); x.a = 10; "x.a assigned to ", x.a, '\n'; try { x.b = 20; } catch (e) { "Assigning to x.b threw ", e, '\n'; } }