lib/rbs/errors.rb in rbs-1.7.1 vs lib/rbs/errors.rb in rbs-1.8.0
- old
+ new
@@ -429,6 +429,18 @@
def name
@alias_names.map(&:name).join(', ')
end
end
+
+ class NonregularTypeAliasError < LoadingError
+ attr_reader :diagnostic
+ attr_reader :location
+
+ def initialize(diagnostic:, location:)
+ @diagnostic = diagnostic
+ @location = location
+
+ super "#{Location.to_string location}: Nonregular generic type alias is prohibited: #{diagnostic.type_name}, #{diagnostic.nonregular_type}"
+ end
+ end
end