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
@preconcurrency
on a function typealias
has no effect
#60487
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
Comments
dnadoba
added
the
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
label
Aug 10, 2022
DougGregor
added a commit
to DougGregor/swift
that referenced
this issue
Aug 12, 2022
…use. When referencing a `@preconcurrency` typealias from code that does not require strict concurrency, strip off `@Sendable` and global actor types. This is consistent with references to functions/properties/etc. that are `@preconcurrency`. Fixes apple#60487, rdar://98343624.
DougGregor
added a commit
to DougGregor/swift
that referenced
this issue
Aug 17, 2022
…use. When referencing a `@preconcurrency` typealias from code that does not require strict concurrency, strip off `@Sendable` and global actor types. This is consistent with references to functions/properties/etc. that are `@preconcurrency`. Fixes apple#60487, rdar://98343624.
DougGregor
added a commit
that referenced
this issue
Aug 17, 2022
…use. When referencing a `@preconcurrency` typealias from code that does not require strict concurrency, strip off `@Sendable` and global actor types. This is consistent with references to functions/properties/etc. that are `@preconcurrency`. Fixes #60487, rdar://98343624.
DougGregor
added a commit
to DougGregor/swift
that referenced
this issue
Aug 17, 2022
…use. When referencing a `@preconcurrency` typealias from code that does not require strict concurrency, strip off `@Sendable` and global actor types. This is consistent with references to functions/properties/etc. that are `@preconcurrency`. Fixes apple#60487, rdar://98343624. (cherry picked from commit 5b88b96)
meg-gupta
pushed a commit
to meg-gupta/swift
that referenced
this issue
Aug 18, 2022
…use. When referencing a `@preconcurrency` typealias from code that does not require strict concurrency, strip off `@Sendable` and global actor types. This is consistent with references to functions/properties/etc. that are `@preconcurrency`. Fixes apple#60487, rdar://98343624.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
Describe the bug
@preconcurrency
on a functiontypealias
has no effect. It should either have an effect as to would on a method taking a function or produce a diagnostics that it is not supported.Steps To Reproduce
Expected behavior
It would be best if we wouldn't get a warning and
methodWithPreconcurrencyOnTypealias(callback:)
would be treated the same asmethodWithPreconcurrencyOnMethod(callback:)
.However,
typealias
is no listed inSE-0337
as a a nominal declaration where the@preconcurrency
attribute can be used and therefore should at least produce some diagnostics.Screenshots
Environment (please fill out the following information)
The text was updated successfully, but these errors were encountered: