Skip to content

[SR-15655] objc protocol cannot use colon-class notation #57934

@mattneub

Description

@mattneub
Previous ID SR-15655
Radar None
Original Reporter @mattneub
Type Bug
Environment

Xcode Version 13.2 (13C90)

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

md5: 15e306cc9a1942747f443aef8af72401

Issue Description:

This is legal:

    protocol NavigationBarNeeder: UIView {}

This is not legal:

    @objc protocol NavigationBarNeeder: UIView {}

You have to say this instead, for the second one:

    @objc protocol NavigationBarNeeder where Self: UIView {}

But why? It's only an alternate notation, after all.

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