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

Commit85d323d

Browse files
smoothdeveloperKevinRansom
authored andcommitted
Tastops.fullNameOfParentOfNonLocalEntityRef and Tastops.fullNameOfParentOfNonLocalEntityRefAsLayout used to perform two comparison by accessing nested properties (up to 4 get per call:nlr.Path.Length = 0 || nlr.Path.Length = 1 (dotnet#2295)
replaced with `nlr.Path.Length < 2`
1 parent1e7bb92 commit85d323d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

‎src/fsharp/TastOps.fs‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2472,11 +2472,11 @@ let fullNameOfPubPath (PubPath(p)) = textOfPath p
24722472
letfullNameOfPubPathAsLayout(PubPath(p))= layoutOfPath(Array.toList p)
24732473

24742474
letfullNameOfParentOfNonLocalEntityRef(nlr:NonLocalEntityRef)=
2475-
if nlr.Path.Length=0|| nlr.Path.Length=1then None
2475+
if nlr.Path.Length<2then None
24762476
else Some(textOfPath nlr.EnclosingMangledPath)// <--- BAD BAD BAD: this is a mangled path. This is wrong for nested modules
24772477

24782478
letfullNameOfParentOfNonLocalEntityRefAsLayout(nlr:NonLocalEntityRef)=
2479-
if nlr.Path.Length=0|| nlr.Path.Length=1then None
2479+
if nlr.Path.Length<2then None
24802480
else Some(layoutOfPath(List.ofArray nlr.EnclosingMangledPath))// <--- BAD BAD BAD: this is a mangled path. This is wrong for nested modules
24812481

24822482
letfullNameOfParentOfEntityRef eref=

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp