cxxstdlib: delete unused CompatibilityError class

This commit is contained in:
fn ⌃ ⌥ 2021-09-29 14:49:22 -07:00 committed by GitHub
parent 4e6919b734
commit 0d7cc258f9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -7,18 +7,6 @@ require "compilers"
class CxxStdlib
extend T::Sig
include CompilerConstants
# Error for when a formula's dependency was built with a different C++ standard library.
class CompatibilityError < StandardError
def initialize(formula, dep, stdlib)
super <<~EOS
#{formula.full_name} dependency #{dep.name} was built with a different C++ standard
library (#{stdlib.type_string} from #{stdlib.compiler}). This may cause problems at runtime.
EOS
end
end
def self.create(type, compiler)
raise ArgumentError, "Invalid C++ stdlib type: #{type}" if type && [:libstdcxx, :libcxx].exclude?(type)