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

Commit4fc2f9b

Browse files
more lazyness to NameResolution
1 parent7eeb470 commit4fc2f9b

File tree

2 files changed

+13
-10
lines changed

2 files changed

+13
-10
lines changed

‎src/fsharp/NameResolution.fs‎

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3232,9 +3232,9 @@ let IsTyconUnseenObsoleteSpec ad g amap m (x:TyconRef) allowObsolete =
32323232
letIsTyconUnseen ad g amap m(x:TyconRef)= IsTyconUnseenObsoleteSpec ad g amap m xfalse
32333233

32343234
letIsValUnseen ad g m(v:ValRef)=
3235-
not(IsValAccessible ad v)||
32363235
v.IsCompilerGenerated||
32373236
v.Deref.IsClassConstructor||
3237+
not(IsValAccessible ad v)||
32383238
CheckFSharpAttributesForUnseen g v.Attribs m
32393239

32403240
letIsUnionCaseUnseen ad g amap m(ucref:UnionCaseRef)=
@@ -4240,10 +4240,12 @@ let rec private GetCompletionForItem (ncenv: NameResolver) (nenv: NameResolution
42404240
|[]->
42414241

42424242
/// Include all the entries in the eUnqualifiedItems table.
4243-
yield!
4244-
nenv.eUnqualifiedItems.Values
4245-
|> List.filter(function Item.UnqualifiedType_->false|_->true)
4246-
|> List.filter(ItemIsUnseen ad g ncenv.amap m>>not)
4243+
for uitemin nenv.eUnqualifiedItems.Valuesdo
4244+
match uitemwith
4245+
| Item.UnqualifiedType_->()
4246+
|_whennot(ItemIsUnseen ad g ncenv.amap m uitem)->
4247+
yield uitem
4248+
|_->()
42474249

42484250
match itemwith
42494251
| Item.ModuleOrNamespaces_->
@@ -4267,10 +4269,11 @@ let rec private GetCompletionForItem (ncenv: NameResolver) (nenv: NameResolution
42674269
thenyield ItemOfTyconRef ncenv m tcref
42684270

42694271
| Item.ActivePatternCase_->
4270-
yield!
4271-
nenv.ePatItems
4272-
|> NameMap.range
4273-
|> List.filter(function Item.ActivePatternCase_v->true|_->false)
4272+
for pitemin NameMap.range nenv.ePatItemsdo
4273+
match pitemwith
4274+
| Item.ActivePatternCase_->
4275+
yield pitem
4276+
|_->()
42744277

42754278
| Item.DelegateCtor_
42764279
| Item.FakeInterfaceCtor_

‎src/fsharp/tast.fs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4511,7 +4511,7 @@ let fullCompPathOfModuleOrNamespace (m:ModuleOrNamespace) =
45114511
CompPath(scoref,cpath@[(m.LogicalName, m.ModuleOrNamespaceType.ModuleOrNamespaceKind)])
45124512

45134513
// Can cpath2 be accessed given a right to access cpath1. That is, is cpath2 a nested type or namespace of cpath1. Note order of arguments.
4514-
letcanAccessCompPathFrom(CompPath(scoref1,cpath1))(CompPath(scoref2,cpath2))=
4514+
letinlinecanAccessCompPathFrom(CompPath(scoref1,cpath1))(CompPath(scoref2,cpath2))=
45154515
let recloop p1 p2=
45164516
match p1,p2with
45174517
|(a1,k1)::rest1,(a2,k2)::rest2->(a1=a2)&&(k1=k2)&& loop rest1 rest2

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp