Skip to content

[SR-7304] typealias overriding associated type ... is better expressed as same-type constraint #49852

@swift-ci

Description

@swift-ci
Previous ID SR-7304
Radar rdar://problem/39040799
Original Reporter tannernelson (JIRA User)
Type Bug
Status Resolved
Resolution Duplicate

Attachment: Download

Environment

confirmed on Swift 4.1 branch 03-18 and 03-26
macOS sierra 10.12.6
Xcode 9.3 beta 4

Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Bug
Assignee None
Priority Medium

md5: 2e2170ea1da2050209f5105ba6dcd674

duplicates:

Issue Description:

This warning cropped up recently in the Swift 4.1 pre-releases.

Swift either needs to "generate" these type-aliases when there is a same-type constraint or let users add them in extensions. Right now, Swift just generates this warning then still requires a concrete type-alias to be defined to use any associated types that may reference that type.

See the twitter thread here: https://twitter.com/UINT_MIN/status/979381922009825280

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.compilerThe Swift compiler itself

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions