Skip to content
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

Unable to target specific declarations using @preconcurrency import #74518

Open
mattmassicotte opened this issue Jun 18, 2024 · 0 comments
Open
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. concurrency Feature: umbrella label for concurrency language features

Comments

@mattmassicotte
Copy link

mattmassicotte commented Jun 18, 2024

Description

I'd like to be able to narrowly target a preconcurrency import. I think this is desirable, because I still want to have other unsafe stuff from the import checked more closely.

Right now, the compiler accepts this code, but seems to apply @preconcurrency to the module as a whole.

Reproduction

// from CoreServices
public var kLSSharedFileListSessionLoginItems: Unmanaged<CFString>

// my code
@preconcurrency import var CoreServices.kLSSharedFileListSessionLoginItems

Expected behavior

Apply to only this imported var.

Environment

Apple Swift version 6.0-dev (LLVM 6e13b8be259f20f, Swift 372de46)
Target: arm64-apple-macosx14.0

Additional information

No response

@mattmassicotte mattmassicotte added bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. triage needed This issue needs more specific labels labels Jun 18, 2024
@hborla hborla added concurrency Feature: umbrella label for concurrency language features and removed triage needed This issue needs more specific labels labels Jul 14, 2024
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. concurrency Feature: umbrella label for concurrency language features
Projects
None yet
Development

No branches or pull requests

2 participants