From 72923a6006e36e34149028004d3703d022e8218a Mon Sep 17 00:00:00 2001 From: Oskar Eichler <62393985+OskarEichler@users.noreply.github.com> Date: Sat, 29 Aug 2026 18:42:23 +0200 Subject: [PATCH] Preserve block locations during transforms --- lib/rbs/types.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/rbs/types.rb b/lib/rbs/types.rb index 5fa045f8a2..5978775769 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