Commit Graph

2 Commits

Author SHA1 Message Date
Mark Lacey
8d9f97cdc5 Fix another subtle SE-0110-related break.
The change to roll back a part of SE-0110 to allow multi-argument
functions to be passed in places where functions taking a tuple are
expected resulted in a regression in some cases where the fix would
strip off the last ParenType from single-argument functions.

Instead of stripping off parens from both function types we're trying to
match when they both have them, strip off none. This ensures that we
don't get summarily rejected in the nested matchTypes call by other
SE-0110-related code that bails if the two types do not have the same
"parenness".

Fixes rdar://problem/33043106 / SR-5387.
2017-07-10 17:36:53 -07:00
Pavel Yaskevich
a82b16fb2d [QoI] Don't assume that contextual type is always present for trailing closure diagnostics
Fixes crasher in diagnostics related to the fact that contextual type
is not always available when trying to diagnose problems related to
calls with trailing closures.

Resolves: rdar://problem/33067102
2017-06-29 23:09:55 -07:00