PY-14222 Don't allow recurive literal collection types

They used to cause infinite recursion in unpredictable places. Limiting
recursion during type inference is a bit easier to understand that doing
that during type checking.
This commit is contained in:
Andrey Vlasovskikh
2014-11-10 15:00:57 +03:00
parent 46b02fe3b2
commit cc6fdcd5c9
8 changed files with 37 additions and 61 deletions
@@ -0,0 +1,5 @@
class C:
def f(self, x):
self.foo = x
self.foo = {'foo': self.foo}
return self.foo['foo'] + 10