File tree Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Expand file tree Collapse file tree 2 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
66
77## [ Unreleased]
88
9+ ### Fixed
10+
11+ - Fixed ` self ` being showed as the first inlay hint incorrectly
12+
913## [ 1.8.0] - 2022-07-30
1014
1115### Added
Original file line number Diff line number Diff line change @@ -144,8 +144,13 @@ struct InlayHintVisitor : public Luau::AstVisitor
144144 if (auto ftv = Luau::get<Luau::FunctionTypeVar>(followedTy))
145145 {
146146 auto namesIt = ftv->argNames .begin ();
147+ auto idx = 0 ;
147148 for (auto param : call->args )
148149 {
150+ // Skip first item if it is self
151+ if (idx == 0 && ftv->hasSelf && call->self )
152+ continue ;
153+
149154 if (namesIt == ftv->argNames .end ())
150155 break ;
151156 if (!namesIt->has_value ())
@@ -171,6 +176,7 @@ struct InlayHintVisitor : public Luau::AstVisitor
171176 hints.emplace_back (hint);
172177
173178 namesIt++;
179+ idx++;
174180 }
175181 }
176182
You can’t perform that action at this time.
0 commit comments