-
Notifications
You must be signed in to change notification settings - Fork 440
Split DeclEffectSpecifiers into AccessorEffectSpecifiers and FunctionEffectSpecifiers #1454
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
Split DeclEffectSpecifiers into AccessorEffectSpecifiers and FunctionEffectSpecifiers #1454
Conversation
Tests/SwiftParserTest/translated/EffectfulPropertiesTests.swift
Outdated
Show resolved
Hide resolved
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.
Conceptually this boils down to a similar problem that I think we discussed in one of your other PRs: As long as we can’t represent that the effect specifier of an accessor cannot be reasync
or rethrows
, then no client (and “client” here includes later stages of the compiler) can assume that asyncSpecifier
of an AccessorDecl
cannot be reasync
and thus needs to diagnose it themselves.
What needs to be done here is that we need to split DeclEffectSpecifiers
into two different nodes: AccessorEffectSpecifiers
and FunctionEffectSpecifiers
where FunctionEffectSpecifiers
does not allow rethrows
and reasync
. For this you need to modify the declaration of DeclEffectSpecifiers
in CodeGeneration
and run generate-swiftsyntax
to regenerate the code. Do you think you could try that?
Tests/SwiftParserTest/translated/EffectfulPropertiesTests.swift
Outdated
Show resolved
Hide resolved
Thanks for your comments! I think I only considered |
Just want to make sure if there is a typo and it should be
|
Yes, that was a typo indeed. Good catch |
ea592ba
to
057fd9c
Compare
I have took |
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.
Thanks. This looks good. I just think you have a lingering TODO comment in your codebase.
…ctionEffectSpecifiers`. Solve TODOs in `EffectfulPropertiesTests.swift`
057fd9c
to
47617a8
Compare
Oh, I forgot to delete that. I've removed it and squashed my changes into a single commit. |
@swift-ci please test |
@swift-ci Please test Windows |
…ies_diagnostics Split DeclEffectSpecifiers into AccessorEffectSpecifiers and FunctionEffectSpecifiers
…ies_diagnostics Split DeclEffectSpecifiers into AccessorEffectSpecifiers and FunctionEffectSpecifiers
Part of #1373