ruby / rbs

Type Signature for Ruby
Other
1.97k stars 217 forks source link

Unsupported splat node occurrence(Ruby::UnsupportedSyntax) #737

Open HoneyryderChuck opened 3 years ago

HoneyryderChuck commented 3 years ago

I'm getting the mentioned error when doing smth like:


ERRORS = [TypeError, StandardError]

# ...
case error
when *ERRORS # error happens here
# ...
POPPIN-FUMI commented 2 years ago

We've got the same error from super.

    def initialize(*args, **kwargs, &block)
      super(*args, **kwargs, &block)

      check_user_permissions(context[:user], Document.new, :search?)
    end
args: ::Array[untyped]

Array

=> Array

Unsupported splat node occurrence(Ruby::UnsupportedSyntax)
hasrthur commented 2 years ago

Hi everyone! Is there any way to fix this issue?

mt-dfrey commented 1 year ago

I ran into this issue as well with

class MyDeviseModel
  def send_devise_notification(notification, *args)
    devise_mailer.send(notification, self, *args) if notification == :reset_password_instructions
  end
end

the signature for send comes from rbs itself in core/object.rbs

type Object::name = Symbol | String
def send: (name name, *untyped args) ?{ (*untyped) -> untyped } -> untyped
coding-red-panda commented 1 year ago

Any update on this? Running into this as well now on stuff like .reject methods etc

rda1902 commented 1 year ago

I also catch this problem

Unsupported splat node occurrence Diagnostic ID: Ruby::UnsupportedSyntax

rescue *Array(exceptions) => e