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

Commitda5d0f6

Browse files
forkiKevinRansom
authored andcommitted
One lookup in nenv.eFieldLabels should be enough (dotnet#4469)
1 parent3fc5e6d commitda5d0f6

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

‎src/fsharp/NameResolution.fs‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3169,16 +3169,16 @@ let private ResolveExprDotLongIdent (ncenv:NameResolver) m ad nenv typ lid findF
31693169
if isAppTy ncenv.g typthen
31703170
NoResultsOrUsefulErrors
31713171
else
3172-
match lidwith
3172+
match lidwith
31733173
// A unique record label access, e.g expr.field
3174-
| id::restwhen nenv.eFieldLabels.ContainsKey(id.idText)->
3175-
match nenv.eFieldLabels.[id.idText]with
3176-
|[]-> NoResultsOrUsefulErrors
3177-
| rfref::_->
3174+
| id::rest->
3175+
match Map.tryFind id.idText nenv.eFieldLabelswith
3176+
| Some(rfref::_)->
31783177
// NOTE (instantiationGenerator cleanup): we need to freshen here because we don't know the type.
31793178
// But perhaps the caller should freshen??
31803179
letitem= FreshenRecdFieldRef ncenv m rfref
31813180
OneSuccess(ResolutionInfo.Empty,item,rest)
3181+
|_-> NoResultsOrUsefulErrors
31823182
|_-> NoResultsOrUsefulErrors
31833183

31843184
letsearch= dotFieldIdSearch

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp