You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Type Alias should start with a small letter.
But it can start with a capital letter accidentally in the syntax.
# test.rbstypeT=StringclassCdefm: ()->Tend
$ rbs parse test.rbs
$ echo$?
0
$ rbs -I . validate --silent
/path/to/rbs-1.0.0/lib/rbs/errors.rb:96:in `check!': test.rbs:4:15...4:16: Could not find ::T (RBS::NoTypeFoundError) from /path/to/rbs-1.0.0/lib/rbs/variance_calculator.rb:114:in `type' from /path/to/rbs-1.0.0/lib/rbs/variance_calculator.rb:83:in `in_method_type' from /path/to/rbs-1.0.0/lib/rbs/definition_builder.rb:523:in `block (2 levels) in validate_type_params'
from /path/to/rbs-1.0.0/lib/rbs/definition_builder.rb:522:in `each' from /path/to/rbs-1.0.0/lib/rbs/definition_builder.rb:522:in `block in validate_type_params' from /path/to/rbs-1.0.0/lib/rbs/definition_builder/method_builder.rb:48:in `block in each' from /home/pocke/.rbenv/versions/trunk/lib/ruby/3.1.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component'
from /home/pocke/.rbenv/versions/trunk/lib/ruby/3.1.0/tsort.rb:431:in `each_strongly_connected_component_from' from /home/pocke/.rbenv/versions/trunk/lib/ruby/3.1.0/tsort.rb:349:in `block in each_strongly_connected_component' from /path/to/rbs-1.0.0/lib/rbs/definition_builder/method_builder.rb:65:in `each_value' from /path/to/rbs-1.0.0/lib/rbs/definition_builder/method_builder.rb:65:in `tsort_each_node'
from /home/pocke/.rbenv/versions/trunk/lib/ruby/3.1.0/tsort.rb:347:in `call' from /home/pocke/.rbenv/versions/trunk/lib/ruby/3.1.0/tsort.rb:347:in `each_strongly_connected_component' from /home/pocke/.rbenv/versions/trunk/lib/ruby/3.1.0/tsort.rb:316:in `each_strongly_connected_component' from /path/to/rbs-1.0.0/lib/rbs/definition_builder/method_builder.rb:43:in `each'
from /path/to/rbs-1.0.0/lib/rbs/definition_builder.rb:485:in `validate_type_params' from /path/to/rbs-1.0.0/lib/rbs/definition_builder.rb:150:in `block (2 levels) in build_instance' from <internal:kernel>:90:in `tap' from /path/to/rbs-1.0.0/lib/rbs/definition_builder.rb:146:in `block in build_instance'
from /path/to/rbs-1.0.0/lib/rbs/definition_builder.rb:765:in `try_cache' from /path/to/rbs-1.0.0/lib/rbs/definition_builder.rb:135:in `build_instance' from /path/to/rbs-1.0.0/lib/rbs/cli.rb:423:in `block in run_validate' from /path/to/rbs-1.0.0/lib/rbs/cli.rb:421:in `each_key'
from /path/to/rbs-1.0.0/lib/rbs/cli.rb:421:in `run_validate' from /path/to/rbs-1.0.0/lib/rbs/cli.rb:113:in `run' from /path/to/rbs-1.0.0/exe/rbs:7:in `<top (required)>' from /home/pocke/.rbenv/versions/trunk/bin/rbs:23:in `load'
from /home/pocke/.rbenv/versions/trunk/bin/rbs:23:in `<main>'
Expected Behavior
I think it should cause a syntax error.
The type alias T can't be referred because a name that starts with a capital letter is a class or module. So it is confusing if it doesn't cause a syntax error.
The text was updated successfully, but these errors were encountered:
Problem
Type Alias should start with a small letter.
But it can start with a capital letter accidentally in the syntax.
Expected Behavior
I think it should cause a syntax error.
The type alias
T
can't be referred because a name that starts with a capital letter is a class or module. So it is confusing if it doesn't cause a syntax error.The text was updated successfully, but these errors were encountered: