|
14 | 14 | // |
15 | 15 | //===----------------------------------------------------------------------===// |
16 | 16 |
|
17 | | -#include "TypeChecker.h" |
| 17 | +#include "MiscDiagnostics.h" |
18 | 18 | #include "TypeCheckAvailability.h" |
19 | 19 | #include "TypeCheckConcurrency.h" |
20 | 20 | #include "TypeCheckDistributed.h" |
21 | 21 | #include "TypeCheckType.h" |
22 | | -#include "MiscDiagnostics.h" |
23 | | -#include "swift/Subsystems.h" |
| 22 | +#include "TypeChecker.h" |
24 | 23 | #include "swift/AST/ASTPrinter.h" |
25 | 24 | #include "swift/AST/ASTScope.h" |
26 | | -#include "swift/AST/ASTWalker.h" |
27 | 25 | #include "swift/AST/ASTVisitor.h" |
28 | | -#include "swift/AST/DiagnosticsSema.h" |
| 26 | +#include "swift/AST/ASTWalker.h" |
29 | 27 | #include "swift/AST/DiagnosticSuppression.h" |
| 28 | +#include "swift/AST/DiagnosticsSema.h" |
30 | 29 | #include "swift/AST/Identifier.h" |
31 | 30 | #include "swift/AST/Initializer.h" |
32 | 31 | #include "swift/AST/NameLookup.h" |
|
41 | 40 | #include "swift/Basic/TopCollection.h" |
42 | 41 | #include "swift/Parse/Lexer.h" |
43 | 42 | #include "swift/Parse/Parser.h" |
| 43 | +#include "swift/Sema/ConstraintSystem.h" |
44 | 44 | #include "swift/Sema/IDETypeChecking.h" |
| 45 | +#include "swift/Subsystems.h" |
45 | 46 | #include "llvm/ADT/DenseMap.h" |
46 | 47 | #include "llvm/ADT/PointerUnion.h" |
47 | 48 | #include "llvm/ADT/SmallString.h" |
@@ -1751,7 +1752,7 @@ Stmt *PreCheckReturnStmtRequest::evaluate(Evaluator &evaluator, ReturnStmt *RS, |
1751 | 1752 | static bool isDiscardableType(Type type) { |
1752 | 1753 | // If type is `(_: repeat ...)`, it can be discardable. |
1753 | 1754 | if (auto *tuple = type->getAs<TupleType>()) { |
1754 | | - if (tuple->isSingleUnlabeledPackExpansion()) { |
| 1755 | + if (constraints::isSingleUnlabeledPackExpansionTuple(tuple)) { |
1755 | 1756 | type = tuple->getElementType(0); |
1756 | 1757 | } |
1757 | 1758 | } |
|
0 commit comments