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
Returned tuples don't match compatible types when using function union types #36053
Activity
jcalz commentedon Jan 7, 2020
Duplicate of #241
falsandtru commentedon Jan 7, 2020
I'm really not sure why you could think so. The compiler just chooses a type. Doesn't measure the variance.
jcalz commentedon Jan 7, 2020
The return type of
() => [0]is widened tonumber[], despite contextual type information about the expected parameter off()andg().falsandtru commentedon Jan 7, 2020
Then can you explain why the following code won't be an error?
jcalz commentedon Jan 7, 2020
Magic? (No, I’m not sure.)
RyanCavanaugh commentedon Jan 7, 2020
Not sure which direction we should go on this one.
falsandtru commentedon Jan 8, 2020
Joe Calzaretta (@jcalz) Your stupid comments are really useless and annoying. Don't touch my issues. I'm not posting issues to talk to you.