-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Tweak Parse and SILGen to support loading swiftinterface files #18764
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
We're going to do need to do more here for inlinable accessors, which /do/ have bodies, but this helps us get to a bare minimum testing configuration.
@swift-ci Please smoke test |
lib/SILGen/SILGen.cpp
Outdated
@@ -778,7 +778,7 @@ void SILGenModule::emitConstructor(ConstructorDecl *decl) { | |||
|
|||
// If this constructor was imported, we don't need the initializing |
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.
Can you update this comment to account for the behavior 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.
Heh, I was banking on the double meaning of "imported", but you're right.
8fc9e1e
to
5b23cf8
Compare
@swift-ci Please smoke test |
Whoops, this breaks |
5b23cf8
to
a2ed23f
Compare
@swift-ci Please smoke test |
…still got it wrong. I should just run the full test suite locally before the next try. |
The presence of a deinitializer will eventually indicate whether a class's deinitializer is non-trivial for non-resilient modules. Also improve recovery for normal source files for various bad ways of declaring a deinitializer.
a2ed23f
to
29ac717
Compare
@swift-ci Please smoke test |
No functionality change.
I was surprised to see this parses fine already, but SILGen still needs a new check.
This is not an exhaustive test of language features, but it at least checks that the simple stuff is working.
29ac717
to
1a3cb5b
Compare
@swift-ci Please smoke test |
@@ -17,8 +17,8 @@ struct FooStructConstructorC { | |||
|
|||
struct FooStructDeinitializerA { | |||
deinit // expected-error {{expected '{' for deinitializer}} | |||
deinit x // expected-error {{deinitializers cannot have a name}} {{10-12=}} | |||
deinit x() // expected-error {{deinitializers cannot have a name}} {{10-11=}} | |||
deinit x // expected-error {{deinitializers cannot have a name}} {{10-12=}} expected-error {{expected '{' for deinitializer}} |
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.
Small drive-by diagnostic improvement too!
Handle accessors, initializers, and deinitializers without bodies, which will all appear in textual interface files.