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

Commitbfcc390

Browse files
notify name resolution sink about nameof operator argument Item in order to not loose its FSharpSymbolUse
1 parent067955a commitbfcc390

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

‎src/fsharp/NameResolution.fs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1193,7 +1193,7 @@ type ItemOccurence =
11931193
typeITypecheckResultsSink=
11941194
abstractNotifyEnvWithScope :range*NameResolutionEnv*AccessorDomain->unit
11951195
abstractNotifyExprHasType :pos*TType*Tastops.DisplayEnv*NameResolutionEnv*AccessorDomain*range->unit
1196-
abstractNotifyNameResolution :pos*Item*Item*ItemOccurence*Tastops.DisplayEnv*NameResolutionEnv*AccessorDomain*range*bool->unit
1196+
abstractNotifyNameResolution :pos*item:Item*itemMethodGroup:Item*ItemOccurence*Tastops.DisplayEnv*NameResolutionEnv*AccessorDomain*range* replace:bool->unit
11971197
abstractNotifyFormatSpecifierLocation :range->unit
11981198
abstractCurrentSource :stringoption
11991199

‎src/fsharp/TypeChecker.fs‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8325,7 +8325,9 @@ and TcFunctionApplicationThen cenv overallTy env tpenv mExprAndArg expr exprty (
83258325
match cleanSynArg with
83268326
| LastPartOfLongIdentStripParens (idents, lastIdent) ->
83278327
// Try to resolve the `nameof` operator argument to prevent passing anything to it.
8328-
ResolveExprLongIdent cenv.tcSink cenv.nameResolver mArg env.eAccessRights env.eNameResEnv TypeNameResolutionInfo.Default idents |> ignore
8328+
let item, _ = ResolveExprLongIdent cenv.tcSink cenv.nameResolver mArg env.eAccessRights env.eNameResEnv TypeNameResolutionInfo.Default idents
8329+
// Notify name resolution sink about the resolved argument in order to not loose symbol use, which is used in IDE.
8330+
CallNameResolutionSink cenv.tcSink (cleanSynArg.Range, env.eNameResEnv, item, item, ItemOccurence.Use, env.DisplayEnv, env.eAccessRights)
83298331

83308332
let r = expr.Range
83318333
// generate fake `range` for the constant the `nameof(..)` we are substituting

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp