Method: Steep::Interface::Substitution#merge!

Defined in:
lib/steep/interface/substitution.rb

#merge!(s) ⇒ Object



49
50
51
52
53
54
55
56
57
58
# File 'lib/steep/interface/substitution.rb', line 49

def merge!(s)
  dictionary.transform_values! {|ty| ty.subst(s) }
  dictionary.merge!(s.dictionary) do |key, a, b|
    if a == b
      a
    else
      raise "Duplicated key on merge!: #{key}, #{a}, #{b}"
    end
  end
end