···117117 ::Array >= supertype
118118 when ::Hash
119119 ::Hash >= supertype
120120+ when Literal::Type
121121+ subtype <= supertype
120122 else
121123 false
122124 end
+9
lib/literal/type.rb
···44 def >=(other)
55 self == other
66 end
77+88+ def <=(other)
99+ case other
1010+ when Literal::Type
1111+ other >= self
1212+ else
1313+ false
1414+ end
1515+ end
716end
+7
lib/literal/types/constraint_type.rb
···6969 end
7070 end
71717272+ def <=(other)
7373+ case other
7474+ when Module
7575+ @object_constraints.any? { |constraint| Literal.subtype?(other, constraint) }
7676+ end
7777+ end
7878+7279 def record_literal_type_errors(context)
7380 @object_constraints.each do |constraint|
7481 next if constraint === context.actual