diff --git a/semantic-ruby/src/Language/Ruby/Tags.hs b/semantic-ruby/src/Language/Ruby/Tags.hs index ea92092e4..f39e652bb 100644 --- a/semantic-ruby/src/Language/Ruby/Tags.hs +++ b/semantic-ruby/src/Language/Ruby/Tags.hs @@ -182,13 +182,13 @@ instance ToTags Rb.SingletonMethod where tags t@Rb.SingletonMethod { ann = Loc {byteRange = Range {start}}, - name, + name = Parse.Success n, parameters - } = yieldMethodNameTag t range' name + } = yieldMethodNameTag t range' n where range' = case parameters of - Just Rb.MethodParameters {ann = Loc {byteRange = Range {end}}} -> Range start end - _ -> Range start (getEnd name) + Just (Parse.Success (Rb.MethodParameters {ann = Loc {byteRange = Range {end}}})) -> Range start end + _ -> Range start (getEnd n) getEnd = Range.end . byteRange . TS.gann instance ToTags Rb.Block where