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

type of class instance variable #2277

Open
znz opened this issue Feb 17, 2025 · 0 comments
Open

type of class instance variable #2277

znz opened this issue Feb 17, 2025 · 0 comments

Comments

@znz
Copy link
Member

znz commented Feb 17, 2025

rbs prototype rb always generates untyped for class instance variables.
And rbs subtract does not remove the type of class instance variables.

% rbs --version
rbs 3.8.1
% cat class_instance_variable.rb
class C
  @civ = []
end
% cat sig/class_instance_variable.rbs
class C
  self.@civ: Array
end
% rbs prototype rb class_instance_variable.rb -o prototype
Processing `class_instance_variable.rb`...
  Generating RBS for `class_instance_variable.rb`...
    - Writing RBS to `prototype/class_instance_variable.rbs`...
% cat prototype/class_instance_variable.rbs
class C
  self.@civ: untyped
end
% rbs subtract --write prototype sig
% cat prototype/class_instance_variable.rbs
class C
  self.@civ: untyped
end

How can I empty prototype after rbs subtract with class instance variables?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant