[SR-8306] declaring a fileprivate instance method in a private extension #50834
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
compiler
The Swift compiler in itself
good first issue
Good for newcomers
Environment
Version 9.4.1 (9F2000)
Additional Detail from JIRA
md5: 2c94bb213e8bd96282b0f290be64d309
Issue Description:
The source of the problem probably lies in the fact that extensions are top level declarations, for which
private
andfileprivate
are equivalent.foo()
obviously can't be more thanfileprivate
and will be so by default, so we can safely omit its access level here. The warning, however, seems to be unnecessary (we have full right to havefoo
explicitlyfileprivate
) and ill-advised (it offers a fix-it that downgradesfoo
toprivate
)The text was updated successfully, but these errors were encountered: