1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/tests/attribute_access_type_restriction_logical.py Sat Jun 09 18:28:02 2012 +0200
1.3 @@ -0,0 +1,30 @@
1.4 +#!/usr/bin/env python
1.5 +
1.6 +class C:
1.7 + def f(self):
1.8 + return 1
1.9 + def g(self):
1.10 + return 2
1.11 +
1.12 +class D:
1.13 + def f(self):
1.14 + return 0
1.15 +
1.16 +def test(x):
1.17 + if x.f() and x.g():
1.18 + return 3
1.19 + else:
1.20 + return 4
1.21 +
1.22 +def test2(x):
1.23 + if not x.f() or x.g():
1.24 + return 5
1.25 + else:
1.26 + return 6
1.27 +
1.28 +c = C()
1.29 +d = D()
1.30 +result_4 = test(d)
1.31 +result_5 = test2(d)
1.32 +
1.33 +# vim: tabstop=4 expandtab shiftwidth=4