-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ensure that generics parameters are set in Array and Hash
The RBS generated by rbs-inline does not have generics for Array and Hash, so `rbs validate` will fail. ```ruby # example.rb class A FOO = [] BAR = {} end ```` ```console $ rbs-inline --opt-out --output example.rb $ rbs -I sig validate E, [2024-09-18T23:35:08.624066 #79451] ERROR -- rbs: sig/generated/example.rbs:4:7. .4:14: ::Array expects parameters [unchecked out Elem], but given args [] (RBS::InvalidTypeApplicationError) E, [2024-09-18T23:35:08.624103 #79451] ERROR -- rbs: sig/generated/example.rbs:6:7. .6:13: ::Hash expects parameters [unchecked out K, unchecked out V], but given args [] (RBS::InvalidTypeApplicationError) ```` Add untyped generics parameters to avoid validation errors.
- Loading branch information
Showing
3 changed files
with
44 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters