Method: Z3::Expr.coerce_to_same_sort

Defined in:
lib/z3/expr/expr.rb

.coerce_to_same_sort(*args) ⇒ Object



24
25
26
27
28
29
30
# File 'lib/z3/expr/expr.rb', line 24

def coerce_to_same_sort(*args)
  # This will raise exception unless one of the sorts is highest
  max_sort = args.map { |a| a.is_a?(Expr) ? a.sort : Expr.sort_for_const(a) }.max
  args.map do |a|
    max_sort.cast(a)
  end
end