2017-02-17 | Paul Boddie | file changeset files shortlog | Changed local context storage to employ arrays, similar to those employed for targets, with access instructions being parameterised with the appropriate array index. This should avoid sequence point warnings for context storage operations. | method-wrapper-for-context |
paul@351 | 1 | class C: |
paul@351 | 2 | def __init__(self): |
paul@351 | 3 | self.x = 1 |
paul@351 | 4 | def f(self): |
paul@351 | 5 | return self.x |
paul@351 | 6 | |
paul@351 | 7 | class D(C): |
paul@351 | 8 | pass |
paul@351 | 9 | |
paul@351 | 10 | class E(C): |
paul@351 | 11 | def __init__(self, x): |
paul@351 | 12 | self.x = x |
paul@351 | 13 | |
paul@351 | 14 | d = D() |
paul@351 | 15 | print d.f() |
paul@351 | 16 | |
paul@351 | 17 | e = E(2) |
paul@351 | 18 | print e.f() |