diff --git a/lib/rbs/types.rb b/lib/rbs/types.rb index dd2437a2c..728cbbd78 100644 --- a/lib/rbs/types.rb +++ b/lib/rbs/types.rb @@ -1427,7 +1427,8 @@ def sub(s) self.class.new( type: type.sub(s), required: required, - self_type: self_type&.sub(s) + self_type: self_type&.sub(s), + location: location ) end @@ -1435,7 +1436,8 @@ def map_type(&block) Block.new( required: required, type: type.map_type(&block), - self_type: self_type ? yield(self_type) : nil + self_type: self_type ? yield(self_type) : nil, + location: location ) end end