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

Commit0a8c0fa

Browse files
forkiKevinRansom
authored andcommitted
Remove double lookups from NameResolution (dotnet#4751)
1 parent8cbb761 commit0a8c0fa

File tree

1 file changed

+6
-15
lines changed

1 file changed

+6
-15
lines changed

‎src/fsharp/NameResolution.fs‎

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4445,21 +4445,12 @@ let rec GetCompletionForItem (ncenv: NameResolver) (nenv: NameResolutionEnv) m a
44454445
else Seq.empty)
44464446

44474447
// Look for values called 'id' that accept the dot-notation
4448-
letvalues,isItemVal=
4449-
(if nenv.eUnqualifiedItems.ContainsKey(id)then
4450-
// v.lookup : member of a value
4451-
letv= nenv.eUnqualifiedItems.[id]
4452-
match vwith
4453-
| Item.Value x->
4454-
lettyp= x.Type
4455-
lettyp=if x.BaseOrThisInfo= CtorThisVal&& isRefCellTy g typthen destRefCellTy g typelse typ
4456-
(ResolvePartialLongIdentInTypeForItem ncenv nenv m adfalse rest item typ),true
4457-
|_-> Seq.empty,false
4458-
else Seq.empty,false)
4459-
4460-
yield! values
4461-
4462-
ifnot isItemValthen
4448+
match Map.tryFind id nenv.eUnqualifiedItemswith
4449+
| Some(Item.Value x)->
4450+
lettyp= x.Type
4451+
lettyp=if x.BaseOrThisInfo= CtorThisVal&& isRefCellTy g typthen destRefCellTy g typelse typ
4452+
yield! ResolvePartialLongIdentInTypeForItem ncenv nenv m adfalse rest item typ
4453+
|_->
44634454
// type.lookup : lookup a static something in a type
44644455
for tcrefin LookupTypeNameInEnvNoArity OpenQualified id nenvdo
44654456
lettcref= ResolveNestedTypeThroughAbbreviation ncenv tcref m

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp