module T
def self.absurd(value)
happens. Commonly used to assert that a case or if statement exhausts all
A way to ask Sorbet to prove that a certain branch of control flow never
def self.absurd(value) msg = "Control flow reached T.absurd." case value when Kernel msg += " Got value: #{value}" end begin raise TypeError.new(msg) rescue TypeError => e # raise into rescue to ensure e.backtrace is populated T::Configuration.inline_type_error_handler(e, {kind: 'T.absurd', value: value, type: nil}) end end