Skip to content

[SR-1960] typealias in extension may not work depending on the compile order. #44569

@swift-ci

Description

@swift-ci
Previous ID SR-1960
Radar None
Original Reporter nh7a (JIRA User)
Type Bug
Status Resolved
Resolution Duplicate
Additional Detail from JIRA
Votes 0
Component/s
Labels Bug
Assignee None
Priority Medium

md5: 889863ce2033f9cc73b7dc52d4ee8add

duplicates:

  • SR-631 Extensions in different files do not recognize each other

Issue Description:

When I have code like below in a file,

extension NSObject {
    typealias Name = String
}

I should be able to use the type somewhere else like below,

extension NSObject.Name {
    static let b = NSObject.Name("b")
}

but it can fail by "'Name' is not a member type of 'NSObject'" depending on the compile order.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions