Skip to content

Support for untyped function parameters in RBS #1466

@nanachi-code

Description

@nanachi-code

This syntax was introduced in RBS 3.5.

class Foo
  def dynamic: (?) -> void
end

Right now if I try to format this it will raise
undefined method `required_positionals' for #<RBS::Types::UntypedFunction:0x000002913499d528 @return_type=#<RBS::Types::Bases::Void:0x000002913499d618 @location=#<RBS::Location:1820 buffer=a.rbs, start=170:58, pos=7202...7206, children= source="void">>>.
SyntaxTree can generate the AST for it just fine with the syntax_tree-rbs plugin so my guess is that this is a Prettier problem.

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