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

Commite0596f3

Browse files
vasily-kirichenkoKevinRansom
authored andcommitted
fix error range of wrong namespace in open declaration (#3966)
1 parentae6f593 commite0596f3

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

‎src/fsharp/NameResolution.fs‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1767,19 +1767,19 @@ let rec ResolveLongIndentAsModuleOrNamespace atMostOne amap m fullyQualified (ne
17671767

17681768
UndefinedName(0,FSComp.SR.undefinedNameNamespaceOrModule,id,suggestModulesAndNamespaces))
17691769

1770-
letmoduleNotFoundErrorCache= ref None
1771-
letmoduleNotFound(modref:ModuleOrNamespaceRef)(mty:ModuleOrNamespaceType)id depth=
1772-
match!moduleNotFoundErrorCachewith
1773-
| Some error-> error
1774-
|None->
1770+
letmutablemoduleNotFoundErrorCache= None
1771+
letmoduleNotFound(modref:ModuleOrNamespaceRef)(mty:ModuleOrNamespaceType)(id:Ident)depth=
1772+
match moduleNotFoundErrorCachewith
1773+
| Some(oldId,error)when oldId= id.idRange-> error
1774+
|_->
17751775
letsuggestNames()=
17761776
mty.ModulesAndNamespacesByDemangledName
17771777
|> Seq.filter(fun kv-> IsEntityAccessible amap m ad(modref.NestedTyconRef kv.Value))
17781778
|> Seq.collect(fun e->[e.Value.DisplayName; e.Value.DemangledModuleOrNamespaceName])
17791779
|> HashSet
17801780

17811781
leterror= raze(UndefinedName(depth,FSComp.SR.undefinedNameNamespace,id,suggestNames))
1782-
moduleNotFoundErrorCache:= Some error
1782+
moduleNotFoundErrorCache<- Some(id.idRange, error)
17831783
error
17841784

17851785
match moduleOrNamespaces.TryFind id.idTextwith

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp