Skip to content

Rock parses function arguments with default values incorrectly #990

@marcusnaslund

Description

@marcusnaslund

All of these should of course be equal, but are unfortunately not:

foo: func (a := false, b := true) // works
moo: func (a: Bool = false, b := true) // works
bar: func (a := false, b: Bool = true) // does not work
car: func (a: Bool = false, b: Bool = true) // does not work

For example, bar fails with error Couldn't unwrap decl 'false: Bool', which suggests rock parses something incorrectly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions