···9898 subtype = subtype.block.call if Types::DeferredType === subtype
9999 supertype = supertype.block.call if Types::DeferredType === supertype
100100101101+ return true if subtype == Types::NeverType::Instance
102102+101103 return true if supertype == subtype
102104103105 case supertype
+4
lib/literal/types.rb
···273273 )
274274 end
275275276276+ def _Kind(type)
277277+ KindType.new(type)
278278+ end
279279+276280 # Matches if the value is a `Proc` and `#lambda?` returns truthy.
277281 def _Lambda
278282 LambdaType
+1-1
lib/literal/types/constraint_type.rb
···7272 def <=(other)
7373 case other
7474 when Module
7575- @object_constraints.any? { |constraint| Literal.subtype?(other, constraint) }
7575+ @object_constraints.any? { |constraint| Literal.subtype?(constraint, other) }
7676 end
7777 end
7878
+7
lib/literal/types/intersection_type.rb
···5252 end
5353 end
54545555+ def <=(other)
5656+ case other
5757+ when Module
5858+ @types.any? { |type| Literal.subtype?(type, other) }
5959+ end
6060+ end
6161+5562 freeze
5663end
+18
lib/literal/types/kind_type.rb
···11+# frozen_string_literal: true
22+33+class Literal::Types::KindType
44+ include Literal::Type
55+66+ def initialize(type)
77+ @type = type
88+ freeze
99+ end
1010+1111+ attr_reader :type
1212+1313+ def ===(object)
1414+ Literal.subtype?(object, @type)
1515+ end
1616+1717+ freeze
1818+end
+5-1
lib/literal/types/never_type.rb
···16161717 def >=(other)
1818 case other
1919- when Literal::Types::NeverTypeClass
1919+ when Literal::Types::NeverType
2020 true
2121 else
2222 false
2323 end
2424+ end
2525+2626+ def <=(_other)
2727+ true
2428 end
25292630 freeze