1 #!/usr/bin/env python 2 3 """ 4 This test attempts to cause the recording of the usage of 'C' in the function 5 'f', alongside the expectation that 'D' might be used instead. A guard 6 stipulating constraints for all of 'f' cannot therefore be generated. Meanwhile, 7 the method 'E.h' should be eliminated. 8 """ 9 10 class C: 11 def f(self): 12 return 1 13 14 class D: 15 def g(self): 16 return 2 17 18 class E: 19 def h(self): # unused 20 return 3 21 22 def f(c): 23 if 1: 24 if 1: 25 x = c.f() 26 return x 27 return c.g() 28 29 c = C() 30 d = D() 31 e = E() 32 result1_1 = f(c) 33 34 # vim: tabstop=4 expandtab shiftwidth=4