@preconcurrency import
unexpectedly affected by order
#64392
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
concurrency
Feature: umbrella label for concurrency language features
Description
@preconcurrency import
should apply@preconcurreny
to what it imports exactly. eg.,@preconcurrency import struct Foundation.Date
should import exactlyFoundation.Date
as a@preconcurreny struct
.However, an experiment found that the compiler will emit false diagnostic on
@preconcurrency import
if there're more than oneimport
s for the same module and the@preconcurrency
one is not the first of them.Steps to reproduce
triggers compiler warning
Expected behavior
The code should compile without warnings.
Environment
Swift version 5.7.3 (swift-5.7.3-RELEASE)
Target: x86_64-unknown-linux-gnu
Additional context
If we change the order of the two imports in the example code:
Then it is warning-free as expected😅
The text was updated successfully, but these errors were encountered: