mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
PY-86002 Revert also PY-25989 PY-84544 to fix new test failures after the revert to weak unions
Namely, `generics_basic.py` in the conformance test suite and Py3TypeCheckerInspectionTest.testTypeVarWidening. Revert 07803c6243370d55df0d870e2e32b38170c1fb49 (cherry picked from commit 9c334ef32597be1d1e8fbc3251ac267be46555c8) IJ-MR-184619 GitOrigin-RevId: 4b2440c973d9c7a7a42590665bd473c4e7a4c9cf
This commit is contained in:
committed by
intellij-monorepo-bot
parent
7c1fa29f39
commit
060b900cf9
@@ -40,11 +40,7 @@ def test():
|
||||
print(result)
|
||||
print(result + <warning descr="Expected type 'int', got 'str' instead">'foo'</warning>)
|
||||
|
||||
# Bug: Expected error.
|
||||
# Generics are considered to be covariant.
|
||||
# I.e. `list[str]` is assignable to `list[int | str]`.
|
||||
# Thus, substitution `T` -> `int | str` is considered valid.
|
||||
f2(1, ['foo'], 'bar')
|
||||
f2(1, <warning descr="Expected type 'List[int]' (matched generic type 'List[T]'), got 'List[str]' instead">['foo']</warning>, 'bar')
|
||||
|
||||
result = f3(1, 'foo', True)
|
||||
f4(<warning descr="Expected type 'Tuple[bool, int, str]', got 'Tuple[int, str, bool]' instead">result</warning>)
|
||||
|
||||
Reference in New Issue
Block a user