lib/rbs/environment.rb in rbs-3.0.4 vs lib/rbs/environment.rb in rbs-3.1.0

- old
+ new

@@ -363,19 +363,19 @@ when AST::Declarations::Interface name = decl.name.with_prefix(namespace) if interface_entry = interface_decls[name] - DuplicatedDeclarationError.new(name, decl, interface_entry.decl) + raise DuplicatedDeclarationError.new(name, decl, interface_entry.decl) end interface_decls[name] = InterfaceEntry.new(name: name, decl: decl, outer: outer) when AST::Declarations::TypeAlias name = decl.name.with_prefix(namespace) if entry = type_alias_decls[name] - DuplicatedDeclarationError.new(name, decl, entry.decl) + raise DuplicatedDeclarationError.new(name, decl, entry.decl) end type_alias_decls[name] = TypeAliasEntry.new(name: name, decl: decl, outer: outer) when AST::Declarations::Constant