aboutsummaryrefslogtreecommitdiff
path: root/test/swftests/MemberAssignment.as
blob: dcba5e3ffce2955c46b940c2b40a68d211ecb9a2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// input: [1]
// output: 2

package {
public class MemberAssignment {
    public var v:int;

    public function g():int {
        return this.v;
    }

    public function f(a:int):int{
        this.v = a;
        return this.v + this.g();
    }

    public static function main(a:int): int {
        var v:MemberAssignment = new MemberAssignment();
        return v.f(a);
    }
}
}