class RuboCop::Cop::Sorbet::AllowIncompatibleOverride
sig.override
# good
sig.override(allow_incompatible: true)
# bad
@example
from occurring.
subtype of its superclass. This Cop prevents these design smells
Substitution Principle, meaning that a subclass is not a valid
Using ‘allow_incompatible` suggests a violation of the Liskov
Disallows using `.override(allow_incompatible: true)`.
def on_send(node)
def on_send(node) allow_incompatible_override?(node) do |allow_incompatible_pair| add_offense(allow_incompatible_pair) end end