2006-11-25 | paulb | file changeset files shortlog | Introduced type "pruning" for names where non-accesses (attribute accesses which fail because a type cannot provide an attribute) rule out types provided by names. |
paulb@128 | 1 | class X: |
paulb@128 | 2 | x = 1 |
paulb@128 | 3 | class Y: |
paulb@128 | 4 | y = "2" |
paulb@128 | 5 | class B: |
paulb@128 | 6 | b = 3.0 |
paulb@128 | 7 | class C: |
paulb@128 | 8 | c = 4 |
paulb@131 | 9 | class D(X): |
paulb@131 | 10 | y = True |
paulb@131 | 11 | a = X() and Y() or B() and not C() or D() |
paulb@128 | 12 | b = a.x and a.y or a.b and not a.c |