Skip to content

Conversation

soutaro
Copy link
Member

@soutaro soutaro commented Sep 23, 2019

Some Ruby methods like instance_eval or Rails.application.configure swaps self in the given block. This patch is to support writing the type of them.

def configure: () { () -> void } @ self -> void

Using @ following the type of block specifies the type of self in the block.

Note that you need a space between @ and the type to avoid confusion between instance variables. (TODO: fix parser.)

@soutaro soutaro closed this Dec 17, 2020
@soutaro soutaro deleted the block-self-type branch December 17, 2020 02:03
soutaro pushed a commit that referenced this pull request May 2, 2025
- `parserstate` -> `rbs_parser_t`
    - Variable names `state` -> `parser`
- `comment` -> `rbs_comment_t`
- `error` -> `rbs_error_t`
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