Make TypeCheckError more paranoid in the face of invalid types.

I debated making isBodyThrowing() do this, but decided that
(1) the better recovery mode is to assume that the function
can throw but (2) making isBodyThrowing() return true on an
invalid function would be really weird.

Tested by the crash testsuite.

Swift SVN r27902
This commit is contained in:
John McCall
2015-04-29 02:52:37 +00:00
parent 92acb40f6c
commit bd57e4337c
2 changed files with 21 additions and 1 deletions

View File

@@ -2770,6 +2770,8 @@ public:
ArrayRef<Pattern *> getParamPatterns() { return ParamPattern; }
ArrayRef<const Pattern *> getParamPatterns() const { return ParamPattern; }
unsigned getNaturalArgumentCount() const { return 1; }
/// \brief Retrieve the result type of this closure.
Type getResultType() const;