diff --git a/lib/rbs/types.rb b/lib/rbs/types.rb index 5fa045f8a..597877576 100644 --- a/lib/rbs/types.rb +++ b/lib/rbs/types.rb @@ -1421,7 +1421,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 @@ -1429,7 +1430,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