plugin-ruby icon indicating copy to clipboard operation
plugin-ruby copied to clipboard

Support for untyped function parameters in RBS

Open nanachi-code opened this issue 1 month ago • 0 comments

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.

nanachi-code avatar Nov 24 '25 10:11 nanachi-code