Skip to content

Union of same Tuple with slice or index lose type and size #1579

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
tharvik opened this issue May 25, 2016 · 1 comment
Closed

Union of same Tuple with slice or index lose type and size #1579

tharvik opened this issue May 25, 2016 · 1 comment

Comments

@tharvik
Copy link
Contributor

tharvik commented May 25, 2016

from typing import List, Tuple, Union

def f() -> Union[Tuple[str], Tuple[str]]: return 'a',

v = f()
''.join(v[:])

gives

asd.py:6: error: Argument 1 to "join" of "str" has incompatible type Tuple[_T_co, ...]; expected Iterable[str]
asd.py:7: error: List item 0 has incompatible type "_T_co"

Seems somehow that the tuple "lose" his type (and his size).

How course, it is a simplified example.

Might be related to #1578.

@tharvik tharvik changed the title Union of same Tuple with slice lose type and size Union of same Tuple with slice or index lose type and size May 25, 2016
@tharvik
Copy link
Contributor Author

tharvik commented Jul 7, 2016

This has been fixed by #1596.

@tharvik tharvik closed this as completed Jul 7, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant