MemberAssignment.as 384 B

1234567891011121314151617181920212223
  1. // input: [1]
  2. // output: 2
  3. package {
  4. public class MemberAssignment {
  5. public var v:int;
  6. public function g():int {
  7. return this.v;
  8. }
  9. public function f(a:int):int{
  10. this.v = a;
  11. return this.v + this.g();
  12. }
  13. public static function main(a:int): int {
  14. var v:MemberAssignment = new MemberAssignment();
  15. return v.f(a);
  16. }
  17. }
  18. }