mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
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:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user