soutaro / rbs-inline

Inline RBS type declaration
MIT License
165 stars 6 forks source link

Singleton methods are output as instance methods #37

Closed sinsoku closed 3 weeks ago

sinsoku commented 1 month ago

Steps to reproduce

$ cat issue.rb
# rbs_inline: enabled

class A
  class << self
    def m
    end
  end
end

$ rbs-inline issue.rb
# Generated from issue.rb with RBS::Inline

class A
  def m: () -> untyped
end

🎉 Generated 1 RBS files under

Expected behavior

It should output the singleton methods.

Actual behavior

The definition of the instance method is output.

ParadoxV5 commented 1 month ago

As listed on the roadmap, support for singleton methods are on their way.