Skip to content

[SR-12583] foo() {} {} parses but foo {} {} does not #55028

Open
@jckarter

Description

@jckarter
Previous ID SR-12583
Radar rdar://problem/62202372
Original Reporter @jckarter
Type Bug
Additional Detail from JIRA
Votes 1
Component/s Compiler
Labels Bug, StarterBug
Assignee None
Priority Medium

md5: f3208365889a29361424efaa2b6814cd

Issue Description:

If you have a function that takes a function, then returns a function that takes another function:

func foo(_: ()->()) -> (() -> ()) -> () { fatalError() }

Then you can call it like this:

foo() {} {}

but this doesn't parse:

foo {} {}

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.compilerThe Swift compiler itselfgood first issueGood for newcomers

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions