-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[Sema] NFC - Bypass more Pattern type variables #15545
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
[Sema] NFC - Bypass more Pattern type variables #15545
Conversation
Rather than throw away the result of simplifying the expression if the resulting is InOutType, see if the user explicitly created the InOutType. If they did not, then the RValue type is fine.
@swift-ci please smoke test |
Thank you for continuing the war on InOutType ❤️ |
Hi @CodaFi – I actually don't find If it were up to me, I'd actually merge |
Calling conventions are not types - types are not calling conventions. It’s the right abstraction at the wrong level and misapplied. The semantic AST and pre-semantic AST should not care about it. |
As I said, I get why people are bothered by |
return boundExprTy->getRValueType(); | ||
if (auto boundExpr = locator.trySimplifyToExpr()) { | ||
if (!boundExpr->isSemanticallyInOutExpr()) | ||
return CS.getType(boundExpr)->getRValueType(); |
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.
@rudkx Was there a specific reason this wasn't using the type map before?
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.
Do you mean CS.getType()
? That's just a couple more lines up in the diff.
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, carry on then.
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.
LGTM modulo a question.
@swift-ci please smoke test compiler performance |
Rather than throw away the result of simplifying the expression if the resulting is InOutType, see if the user explicitly created the InOutType. If they did not, then the RValue type is fine.
Hi @rudkx – Based on our conversation in #15542, this change makes InOut on the right hand side work. Right?