You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
"Overloaded ... incompatible return types" error when one overloaded argument is a Tuple #4237
error: Overloaded function signatures 1 and 2 overlap with incompatible return types
I've tried a couple different types for the second overload and so far the error only seems to occur with Tuple[...] arguments. For instance, I don't see the issue if I substitute def f(x:List[C]) -> D: ... as the 2nd overload.
Yeah, this looks like a bug. I'm not sure where to look. Strangely it perseveres if I use Tuple[C, C] or Tuple[Any] but it is gone with Tuple or tuple.
Activity
gvanrossum commentedon Nov 13, 2017
Yeah, this looks like a bug. I'm not sure where to look. Strangely it perseveres if I use
Tuple[C, C]orTuple[Any]but it is gone withTupleortuple.elazarg commentedon Nov 13, 2017
is_overlapping_types()does not check for tuple types, andgvanrossum commentedon Nov 13, 2017
Yeah, still looks like a bug. That comment is not a specification.
elazarg commentedon Nov 13, 2017
Of course.
Add checks for overlapping TupleTypes (#4238)