1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/tests/attribute_access_type_restriction_conditional_nested.py Sat Jun 09 02:01:56 2012 +0200
1.3 @@ -0,0 +1,25 @@
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 g(self):
1.14 + return 3
1.15 +
1.16 +def test_conditional(x, obj):
1.17 + obj.f()
1.18 + if x:
1.19 + if x:
1.20 + a = obj.g()
1.21 + return a
1.22 + return 1
1.23 +
1.24 +c = C()
1.25 +d = D()
1.26 +result1_2 = test_conditional(1, c)
1.27 +
1.28 +# vim: tabstop=4 expandtab shiftwidth=4