Skip to content

ImportDeclSyntax incorrectly state no modifiers are supported by Swift #3213

@Brett-Best

Description

@Brett-Best

ImportDeclSyntax incorrectly state no modifiers are supported by Swift

This is incorrect, a single access level modifier is allowed when either or both:

  • Experimental Feature AccessLevelOnImport is enabled
  • Upcoming Feature InternalImportsByDefault is enabled

/// Modifiers that are attached to the import declaration. Currently, no modifiers are supported by Swift.
public var modifiers: DeclModifierListSyntax {
get {
return Syntax(self).child(at: 3)!.cast(DeclModifierListSyntax.self)
}
set(value) {
self = Syntax(self).replacingChild(at: 3, with: Syntax(value), rawAllocationArena: RawSyntaxArena()).cast(ImportDeclSyntax.self)
}
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions