-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Partially Revert #27862 #28171
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
Partially Revert #27862 #28171
Conversation
@swift-ci please smoke test |
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! Let's try to address new crasher soon though.
include/swift/AST/Decl.h
Outdated
@@ -5214,7 +5214,7 @@ enum class ParamSpecifier : uint8_t { | |||
|
|||
/// A function parameter declaration. | |||
class ParamDecl : public VarDecl { | |||
Identifier ArgumentName; | |||
llvm::PointerIntPair<Identifier, 1, bool> ArgumentNameAndDestrutured; |
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.
Nit: "c" is missing Destrutured
:)
@@ -6,6 +6,7 @@ | |||
// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors | |||
|
|||
// rdar://56144412 | |||
// XFAIL: asserts |
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.
Does this mean that this case started crashing again and has to be moved to "compiler_crashers"? 😢
When SE-110 was being implemented, we accidentally began to accept closure parameter declarations that had no associated parameter names, e.g. foo { ([Int]) in /**/ } This syntax has never been sanctioned by any version of Swift and should be banned. However, the change was made long enough ago and there are enough clients relying on this, that we cannot accept the source break at the moment. For now, add a bit to ParamDecl that marks a parameter as destructured, and back out setting the invalid bit on the type repr for these kinds of declarations. To prevent further spread of this syntax, stub in a warning that offers to insert an anonymous parameter. Resolves part of rdar://56673657 and improves QoI for errors like rdar://56911630
d6a36e1
to
dd1b157
Compare
@swift-ci please smoke test |
⛵️ |
|
When SE-110 was being implemented, we accidentally began to accept
closure parameter declarations that had no associated parameter names,
e.g.
foo { ([Int]) in /**/ }
This syntax has never been sanctioned by any version of Swift and should
be banned. However, the change was made long enough ago and there are
enough clients relying on this, that we cannot accept the source break
at the moment. For now, add a bit to ParamDecl that marks a parameter
as destructured, and back out setting the invalid bit on the type repr
for these kinds of declarations.
To prevent further spread of this syntax, stub in a warning that offers
to insert an anonymous parameter.
Resolves part of rdar://56673657 and improves QoI for errors like
rdar://56911630