You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -2496,6 +2498,15 @@ let ChooseTyconRefInExpr (ncenv: NameResolver, m, ad, nenv, id: Ident, typeNameR
2496
2498
/// that may represent further actions, e.g. further lookups.
2497
2499
let recResolveExprLongIdentPrim sink (ncenv:NameResolver)first fullyQualified m ad nenv (typeNameResInfo:TypeNameResolutionInfo)(id:Ident)(rest:Ident list)isOpenDecl =
2498
2500
letresInfo= ResolutionInfo.Empty
2501
+
letcanSuggestThisItem(item:Item)=
2502
+
// All items can be suggested except nameof when it comes from FSharp.Core.dll and the nameof feature is not enabled
2503
+
match item with
2504
+
| Item.Value v ->
2505
+
letisNameOfOperator= valRefEq ncenv.g ncenv.g.nameof_vref v
2506
+
if isNameOfOperator &¬(ncenv.g.langVersion.SupportsFeature LanguageFeature.NameOf)thenfalse
2507
+
elsetrue
2508
+
|_->true
2509
+
2499
2510
if first && id.idText = MangledGlobalName then
2500
2511
match rest with
2501
2512
|[]->
@@ -2534,7 +2545,7 @@ let rec ResolveExprLongIdentPrim sink (ncenv: NameResolver) first fullyQualified
2534
2545
match fresh with
2535
2546
| Item.Value value ->
2536
2547
letisNameOfOperator= valRefEq ncenv.g ncenv.g.nameof_vref value
2537
-
if isNameOfOperator &¬(ncenv.g.langVersion.SupportsFeature LanguageFeature.NameOf)then
2548
+
if isNameOfOperator &¬(ncenv.languageSupportsNameOf)then
2538
2549
// Do not resolve `nameof` if the feature is unsupported, even if it is FSharp.Core
2539
2550
None
2540
2551
else
@@ -2570,7 +2581,8 @@ let rec ResolveExprLongIdentPrim sink (ncenv: NameResolver) first fullyQualified
0 commit comments