@preconcurrency makes import order significant #76842
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
concurrency
Feature: umbrella label for concurrency language features
triage needed
This issue needs more specific labels
Description
When using
@preconcurrency
the order of imports becomes significant. In particular, when importing a module with@preconcurrency
, it sometimes must go first or its annotation will not take effect. I think this is because the annotation is somehow not being applied consistently to reexported modules?Reproduction
Expected behavior
This should compile. Darwin is imported using
@preconcurrency
, which means thatoptind
that Darwin exposes should be marked with it.Environment
Additional information
For completeness, the following code compiles:
I had originally brought this up as a swift-format bug at swiftlang/swift-format#826 but @ahoppen thinks this is a compiler bug so I'm reporting it here instead.
The text was updated successfully, but these errors were encountered: