Skip to content

[Enhancement] Distinguish keyword arguments from type annotations #19

@yhk1038

Description

@yhk1038

Currently, there is no way to distinguish between keyword arguments and type annotations.

# Type annotation: parameter x has type String
def foo(x: String)
  x
end

# Keyword argument: parameter x has default value "default"
def foo(x: "default")
  x
end

Both syntaxes use the same param: value format, making it impossible to differentiate between them.

This requires syntax design review.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions