-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Improve type join for function types. #15365
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
Conversation
@swift-ci Please smoke test |
|
||
if (First->getKind() != second->getKind()) { | ||
if (secondFnTy->getExtInfo().isNoEscape()) { | ||
return Nonexistent; |
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.
Why not just return CanType()?
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.
As the comment for this member calls out, this makes it clear why the value is being returned.
@@ -714,6 +715,8 @@ static void diagSyntacticUseRestrictions(TypeChecker &TC, const Expr *E, | |||
return; | |||
} else if (isa<MakeTemporarilyEscapableExpr>(parent)) { | |||
return; | |||
} else if (isa<DynamicTypeExpr>(parent)) { |
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.
Test case for this change?
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.
Almost all of the new tests hit this.
It is still not completely general, but this moves things along a little bit.
@swift-ci Please smoke test |
1 similar comment
@swift-ci Please smoke test |
@rudkx I think this broke the source compatibility test suite:
|
As you mentioned elsewhere this didn't cause the break (we already had missing cases). I addressed the issue here: #15448 |
No description provided.