class Steep::AST::Annotation::Collection
def merge_block_annotations(annotations)
def merge_block_annotations(annotations) if annotations.current_module != current_module || annotations.factory != factory raise "Cannot merge another annotation: self=#{self}, other=#{annotations}" end retained_annotations = self.annotations.reject do |annotation| annotation.is_a?(BlockType) || annotation.is_a?(BreakType) end self.class.new(annotations: retained_annotations + annotations.annotations, factory: factory, current_module: current_module) end