mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
PY-20409 Fixed: dict.get(..., None) is assumed to return None
PyTypeChecker: if expected type is UnionType, try to match actual type with its non-generic members and then with generic ones
This commit is contained in:
@@ -1398,6 +1398,13 @@ public class PyTypeTest extends PyTestCase {
|
||||
"expr = float.fromhex(\"0.5\")");
|
||||
}
|
||||
|
||||
// PY-20409
|
||||
public void testGetFromDictWithDefaultNoneValue() {
|
||||
doTest("Any",
|
||||
"d = {}\n" +
|
||||
"expr = d.get(\"abc\", None)");
|
||||
}
|
||||
|
||||
// PY-20757
|
||||
public void testMinOrNone() {
|
||||
doTest("Union[None, Any]",
|
||||
|
||||
Reference in New Issue
Block a user