mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
One more test for PY-22808 to cover changes
This commit is contained in:
+6
@@ -0,0 +1,6 @@
|
||||
from typing import Any
|
||||
from m1 import C
|
||||
|
||||
def f(x: list):
|
||||
c = C()
|
||||
<caret>expr = c.foo(non_existing=0)
|
||||
@@ -0,0 +1,9 @@
|
||||
from typing import TypeVar, Generic, overload, List, Dict
|
||||
|
||||
_T = TypeVar('_T')
|
||||
|
||||
class C(Generic[_T]):
|
||||
@overload
|
||||
def foo(self, i: int) -> Dict[str, _T]: ...
|
||||
@overload
|
||||
def foo(self, s: str) -> List[_T]: ...
|
||||
@@ -118,4 +118,9 @@ public class PyiTypeTest extends PyTestCase {
|
||||
public void testOverloadedNotMatchedType() {
|
||||
doTest("Union[list, Any]");
|
||||
}
|
||||
|
||||
// PY-22808
|
||||
public void testOverloadedNotMatchedGenericType() {
|
||||
doTest("Union[Dict[str, Any], list]");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user