-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Summary
Currently, both bool and Boolean are accepted in .trb source files. For consistency, we should only allow Boolean in user-facing .trb files.
Current Behavior
# Both work currently
def is_valid(): bool # Should error
def is_valid(): Boolean # Correct
Expected Behavior
.trbfiles: OnlyBooleanshould be valid.rbsoutput: Compiler convertsBoolean→bool(RBS standard)
Context
Booleanis defined in T-Ruby stdlib astype Boolean = true | false- RBS standard uses lowercase
bool - TypeScript uses lowercase
boolean, but T-Ruby follows Ruby naming conventions (PascalCase for types)
Implementation Options
- Parser level: Reject
boolduring type annotation parsing - Type checker level: Add
boolto list of unknown/invalid types
Related
- Documentation already uses
Booleanconsistently - Test code updated to use
Booleanin.trbexamples
Metadata
Metadata
Assignees
Labels
No labels