Skip to content

Swift: Passing Lambdas to Functions #1328

Closed
@pyrmont

Description

Name of the lexer
Swift

Code sample
A sample of the code that produces the bug.

funcWithLambdaArg { x in x + 5 }
funcWithLambdaArg { $0 + 5 }
funcWithLambdaArg({ x in x + 5 })

Screenshots
3ABBA849-5CAA-404C-8332-CC691977D754

Additional context
It may not be possible to tokenise the identifier funcWithLambdaArg when a lambda is the only argument because of other possibilities (I'm not familiar enough with Swift to know whether this is the case or not).

What do you think @johnfairh / @lordcodes?

Metadata

Assignees

Labels

bugfix-requestA request for a bugfix to be developed.stale-issueThere has been no activity for a year.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions