One more test for PY-22808 to cover changes

This commit is contained in:
Andrey Vlasovskikh
2017-04-17 18:52:55 +03:00
parent e69ee7fdd8
commit 7a3717c7c8
3 changed files with 20 additions and 0 deletions
@@ -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]");
}
}