Skip to content

[SR-11958] Operator declarations can have an empty inheritance list #54378

Open
@beccadax

Description

@beccadax
Previous ID SR-11958
Radar rdar://problem/58435672
Original Reporter @beccadax
Type Bug
Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Bug, Parser, SourceCompatibility
Assignee None
Priority Medium

md5: d52ce8738765ead76656f6e5c64755cf

Issue Description:

Parser::parseDeclOperatorImpl() accepts code like this:

prefix operator <<< :
func foo() {}

That is, there is a colon but no list of identifiers after it.

The parser should probably should reject this code, but if anyone has written this anywhere, that would break source compatibility.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.compilerThe Swift compiler itselfparserArea → compiler: The legacy C++ parsersource compatibility

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions