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

Fix some rbs #437

Merged
merged 3 commits into from
Jun 9, 2024
Merged

Fix some rbs #437

merged 3 commits into from
Jun 9, 2024

Conversation

ydah
Copy link
Collaborator

@ydah ydah commented Jun 7, 2024

  • Fix an indentation in sig/lrama/options.rbs
  • Fix rbs validate warning
    ❯ bundle exec rbs -I sig validate
    W, [2024-06-07T16:09:23.137310 #4825]  WARN -- rbs: sig/lrama/grammar.rbs:74:19...74:37: `void` type is only allowed in return type or generics parameter (RBS::WillSyntaxError)
          def validate!: () -> (void | bot)
                         ^^^^^^^^^^^^^^^^^^
    
  • Use void instead of bot?

ydah added 3 commits June 7, 2024 16:19
```
❯ bundle exec rbs -I sig validate
W, [2024-06-07T16:09:23.137310 #4825]  WARN -- rbs: sig/lrama/grammar.rbs:74:19...74:37: `void` type is only allowed in return type or generics parameter (RBS::WillSyntaxError)

      def validate!: () -> (void | bot)
                     ^^^^^^^^^^^^^^^^^^
```
The bot is used for methods that either always throw an exception or enter an infinite loop and never terminate. Therefore, I believe void is correct here.
@@ -88,6 +88,6 @@ module Lrama
def fill_default_precedence: () -> void
def fill_symbols: () -> Array[Grammar::Symbol]
def fill_sym_to_rules: () -> Array[Rule]
def validate_rule_lhs_is_nterm!: () -> bot?
def validate_rule_lhs_is_nterm!: () -> void
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

memo) The bot is used for methods that either always throw an exception or enter an infinite loop and never terminate. Therefore, I believe void is correct here.

@ydah ydah merged commit 40781a9 into ruby:master Jun 9, 2024
16 checks passed
@ydah ydah deleted the fix-rbs branch June 13, 2024 04:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant