Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitd65b561

Browse files
cartermpKevinRansom
authored andcommitted
Refactor indexer code fix (dotnet#5692)
1 parent18958ca commitd65b561

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

‎vsintegration/src/FSharp.Editor/CodeFix/FixIndexerAccess.fs‎

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -33,17 +33,18 @@ type internal FSharpFixIndexerAccessCodeFixProvider() =
3333
letdiagnostics= ImmutableArray.Create diagnostic
3434
letspan,replacement=
3535
try
36-
letspan= ref context.Span
37-
36+
let mutablespan= context.Span
37+
38+
letnotStartOfBracket(span:TextSpan)=
39+
lett= TextSpan(span.Start, span.Length+1)
40+
lets= sourceText.GetSubText(t).ToString()
41+
s.[s.Length-1]<>'['
42+
3843
// skip all braces and blanks until we find [
39-
while
40-
(!span).End< sourceText.Length&&
41-
lett= TextSpan((!span).Start,(!span).Length+1)
42-
lets= sourceText.GetSubText(t).ToString()
43-
s.[s.Length-1]<>'['do
44-
span:= TextSpan((!span).Start,(!span).Length+ 1)
45-
46-
!span,sourceText.GetSubText(!span).ToString()
44+
while span.End< sourceText.Length&& notStartOfBracket spando
45+
span<- TextSpan(span.Start, span.Length+1)
46+
47+
span,sourceText.GetSubText(span).ToString()
4748
with
4849
|_-> context.Span,sourceText.GetSubText(context.Span).ToString()
4950

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp