Define Boolean so its operators resolve - #1351
Open
apiology wants to merge 1 commit into
Open
Conversation
Store#get_superclass gives TrueClass and FalseClass a superclass of Boolean, and try_special_superclasses gives Boolean a superclass of Object, but nothing ever declared Boolean. It had no Pin::Namespace, so it carried only Object's methods: 53 against its subclasses' 60. The three it lacked were &, ^ and |, so a value documented @return [Boolean] could not answer operators that both classes it stands for define, and `flag & flag` reported Unresolved call to & on Boolean. Declare it in the core fills with those three members, completing the inheritance chain Solargraph already assumed rather than replacing it. Strong typecheck is unchanged at 531 problems.
apiology
marked this pull request as ready for review
September 9, 2026 00:00
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR was written by Claude Code on behalf of @apiology.
Problem: a value documented
@return [Boolean]cannot answer the three operatorsTrueClassandFalseClassboth define.Store#get_superclassgivesTrueClassandFalseClassa superclass ofBoolean, andtry_special_superclassesgivesBooleana superclass ofObject, but nothing ever declaredBoolean- so it had no namespace pin and carried onlyObject's methods, 53 against its subclasses' 60. The missing three were&,^and|.Solution: declare
Booleanin the core fills with those three members, completing the inheritance chain Solargraph already assumed rather than replacing it. Strong typecheck is unchanged at 531 problems.