-
Notifications
You must be signed in to change notification settings - Fork 10.5k
getInterfaceType() always returns a type #28210
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
getInterfaceType() always returns a type #28210
Conversation
We call isInvalid() a few lines above, so the interface type gets computed anyway.
@swift-ci please test |
@@ -1166,8 +1166,7 @@ class StmtChecker : public StmtVisitor<StmtChecker, Stmt*> { | |||
} | |||
assert(isa<CaseStmt>(initialCaseVarDecl->getParentPatternStmt())); | |||
|
|||
if (vd->getInterfaceType() && initialCaseVarDecl->getType() && |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
VarDecl::getType() also computes the interface type.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah nice, even more cleanup
@swift-ci please test |
Build failed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Excellent! There are various radars floating around where getInterfaceType() returns null and the caller doesn't expect it, great that they're all fixed now.
This picked up the libSyntax failures @swift-ci please test macOS platform |
Remove a handful of checks for whether
getInterfaceType()
returns a non-null type, as it now always returns a non-null type. Also remove a couple of unnecessary calls tohasInterfaceType()
.