# HG changeset patch # User Paul Boddie # Date 1350857466 -7200 # Node ID 1f315a42de7983a7ceb11a1b557bfc15c2d2d414 # Parent dccfd4c9e893c95111c4ef977016c586e03ed67e Added another test of attribute usage deductions. diff -r dccfd4c9e893 -r 1f315a42de79 tests/attribute_access_type_restriction_simple.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/attribute_access_type_restriction_simple.py Mon Oct 22 00:11:06 2012 +0200 @@ -0,0 +1,17 @@ +#!/usr/bin/env python + +class C: + def test(self): + return 3 + +x = 2 +y = 2 + +if y: + c = C() # attributes: {test} or {} + if x: + y = c.test() # targets: {C.test} + +result_3 = y + +# vim: tabstop=4 expandtab shiftwidth=4