Avoid a bug that a compiler might have found, fixes #1469

This commit is contained in:
Dave Halter
2020-01-11 21:35:18 +01:00
parent 4f56ec5daf
commit 095f1295af
2 changed files with 3 additions and 1 deletions

View File

@@ -142,7 +142,6 @@ class TypingValueWithIndex(BaseTypingValueWithGenerics):
class ProxyTypingValue(BaseTypingValue): class ProxyTypingValue(BaseTypingValue):
index_class = TypingValueWithIndex index_class = TypingValueWithIndex
py__simple_getitem__ = None
def with_generics(self, generics_tuple): def with_generics(self, generics_tuple):
return self.index_class.create_cached( return self.index_class.create_cached(

View File

@@ -332,6 +332,9 @@ def union4(x: U[int, str]):
#? int() str() #? int() str()
x x
#? typing.Optional
typing.Optional[0]
# ------------------------- # -------------------------
# Type Vars # Type Vars
# ------------------------- # -------------------------