mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
PY-83348 Narrow X | None object to X after object or x
GitOrigin-RevId: d835132ade43a3f12b78f4029f584cad97180dc2
This commit is contained in:
committed by
intellij-monorepo-bot
parent
4deee10799
commit
acba8a231a
@@ -150,6 +150,18 @@ public class Py3TypeTest extends PyTestCase {
|
||||
d = {}
|
||||
expr = d.pop("abc", None)""");
|
||||
}
|
||||
|
||||
// PY-83348
|
||||
public void testOrExpressionType() {
|
||||
doTest("int | str", """
|
||||
def foo(x: int | None):
|
||||
expr = x or "foo"
|
||||
""");
|
||||
doTest("str", """
|
||||
def foo(x: None):
|
||||
expr = x or "foo"
|
||||
""");
|
||||
}
|
||||
|
||||
public void testYieldInsideLambda() {
|
||||
// Checks that foo is not a generator
|
||||
|
||||
Reference in New Issue
Block a user