# File lib/rgen/util/pattern_matcher.rb, line 176
  def match(pat_element, test_element)
    visited = {}
    check_later = []
    return false unless match_internal(pat_element, test_element, visited, check_later)
    while cl = check_later.shift
      pv, tv = cl.lazy._eval, cl.value
      if cl.feature.is_a?(RGen::ECore::EAttribute)
        unless pv == tv
          match_failed(cl.feature, "wrong attribute value (lazy): #{pv} vs. #{tv}")
          return false 
        end
      else
        if pv.is_a?(Proxy)
          unless pv._target.object_id == tv.object_id
            match_failed(f, "wrong target object")
            return false 
          end
        else
          unless (pv.nil? && tv.nil?) || (!pv.nil? && !tv.nil? && match_internal(pv, tv, visited, check_later))
            return false 
          end
        end
      end
    end
    visited.keys
  end