Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Properly output class signature for core-exts with generic parameters #163

Open
postmodern opened this issue Oct 26, 2022 · 0 comments
Open
Labels
bug Something isn't working

Comments

@postmodern
Copy link

Describe the bug

When generating RBS type signatures for core-ext classes, sord --rbs outputs them as regular classes. They need to be outputted with generic parameters for rbs/steep to properly validate them:

To Reproduce

class Array
  def my_ext
    # ...
  end
end
$ sord --rbs defs.rbs
$ cat defs.rbs

Expected behavior

class Array[unchecked out T]
  def my_ext: () ...
end

Actual behavior

class Array
  def my_ext: () ...
end

Additional information

  • sord (5.0.0)
  • rbs (2.7.0)
  • steep (1.2.1)
@postmodern postmodern added the bug Something isn't working label Oct 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant