Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
dotNET Platform
fsharp
提交
0d88a9ce
F
fsharp
项目概览
dotNET Platform
/
fsharp
12 个月 前同步成功
通知
0
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
F
fsharp
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
0d88a9ce
编写于
7月 04, 2022
作者:
P
Petr Semkin
提交者:
GitHub
7月 04, 2022
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Show arguments names in tooltips for local functions (#13429)
* Show arguments names in tooltips for local functions * Update
上级
0c5671f3
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
38 addition
and
27 deletion
+38
-27
src/Compiler/Checking/CheckDeclarations.fs
src/Compiler/Checking/CheckDeclarations.fs
+3
-0
vsintegration/tests/UnitTests/LegacyLanguageService/Tests.LanguageService.ParameterInfo.fs
...acyLanguageService/Tests.LanguageService.ParameterInfo.fs
+0
-7
vsintegration/tests/UnitTests/LegacyLanguageService/Tests.LanguageService.QuickInfo.fs
.../LegacyLanguageService/Tests.LanguageService.QuickInfo.fs
+1
-1
vsintegration/tests/UnitTests/QuickInfoTests.fs
vsintegration/tests/UnitTests/QuickInfoTests.fs
+34
-19
未找到文件。
src/Compiler/Checking/CheckDeclarations.fs
浏览文件 @
0d88a9ce
...
...
@@ -990,6 +990,9 @@ module IncrClassChecking =
let
memberInfo
=
MakeMemberDataAndMangledNameForMemberVal
(
g
,
tcref
,
false
,
[]
,
[]
,
memberFlags
,
valSynInfo
,
mkSynId
v
.
Range
name
,
true
)
let
copyOfTyconTypars
=
ctorInfo
.
GetNormalizedInstanceCtorDeclaredTypars
cenv
env
.
DisplayEnv
ctorInfo
.
TyconRef
.
Range
AdjustValToTopVal
v
(
Parent
tcref
)
topValInfo
// Add the 'this' pointer on to the function
let
memberTauTy
,
topValInfo
=
let
tauTy
=
v
.
TauType
...
...
vsintegration/tests/UnitTests/LegacyLanguageService/Tests.LanguageService.ParameterInfo.fs
浏览文件 @
0d88a9ce
...
...
@@ -1554,13 +1554,6 @@ We really need to rewrite some code paths here to use the real parse tree rather
bar
(
""", "
bar
(
", ["
int
"]
"""
type
T
()
=
let
foo
x
=
x
+
1
member
this
.
Run
()
=
foo
(
""", "
foo
(
", ["
int
"]
"""
let
f
(
Some
x
)
=
x
+
1
f
(
...
...
vsintegration/tests/UnitTests/LegacyLanguageService/Tests.LanguageService.QuickInfo.fs
浏览文件 @
0d88a9ce
...
...
@@ -764,7 +764,7 @@ Full name: Microsoft.FSharp.Control.Async""".TrimStart().Replace("\r\n", "\n")
type A() =
let fff n = n + 1
"""
this
.
AssertQuickInfoContainsAtEndOfMarker
(
code
,
"let ff"
,
"val fff:
(int -> int)
"
)
this
.
AssertQuickInfoContainsAtEndOfMarker
(
code
,
"let ff"
,
"val fff:
n: int -> int
"
)
// Regression for 2494
[<
Test
>]
...
...
vsintegration/tests/UnitTests/QuickInfoTests.fs
浏览文件 @
0d88a9ce
// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information.
namespace
Microsoft
.
VisualStudio
.
FSharp
.
Editor
.
Tests
.
Roslyn
open
System
.
IO
open
FSharp
.
Compiler
.
CodeAnalysis
open
Microsoft
.
CodeAnalysis
open
Microsoft
.
CodeAnalysis
.
Text
open
Microsoft
.
VisualStudio
.
FSharp
.
Editor
open
NUnit
.
Framework
open
UnitTests
.
TestLib
.
LanguageService
open
VisualFSharp
.
UnitTests
.
Roslyn
[<
Category
"Roslyn Services"
>]
...
...
@@ -45,7 +43,6 @@ let GetQuickInfoTextFromCode (code:string) =
let
expectedLines
(
lines
:
string
list
)
=
System
.
String
.
Join
(
"
\n
"
,
lines
)
// migrated from legacy test
[<
Test
>]
let
``Automation.EnumDUInterfacefromFSBrowse.InsideComputationExpression``
()
=
let
code
=
"""
...
...
@@ -70,7 +67,6 @@ module Test =
let
expected
=
"MyColors.Red: MyColors = 0"
Assert
.
AreEqual
(
expected
,
quickInfo
)
// migrated from legacy test
[<
Test
>]
let
``Automation.EnumDUInterfacefromFSBrowse.InsideMatch``
()
=
let
code
=
"""
...
...
@@ -100,7 +96,6 @@ module Test =
"Full name: FsTest.MyDistance"
]
Assert
.
AreEqual
(
expected
,
quickInfo
)
// migrated from legacy test
[<
Test
>]
let
``Automation.EnumDUInterfacefromFSBrowse.InsideLambda``
()
=
let
code
=
"""
...
...
@@ -129,7 +124,6 @@ module Test =
let
expected
=
"abstract IMyInterface.Represent: unit -> string"
Assert
.
AreEqual
(
expected
,
quickInfo
)
// migrated from legacy test
[<
Test
>]
let
``Automation.RecordAndInterfaceFromFSProj.InsideComputationExpression``
()
=
let
code
=
"""
...
...
@@ -162,7 +156,6 @@ module Test =
Assert
.
AreEqual
(
expected
,
quickInfo
)
()
// migrated from legacy test
[<
Test
>]
let
``Automation.RecordAndInterfaceFromFSProj.InsideQuotation``
()
=
let
code
=
"""
...
...
@@ -186,7 +179,6 @@ module Test =
Assert
.
AreEqual
(
expected
,
quickInfo
)
()
// migrated from legacy test
[<
Test
>]
let
``Automation.RecordAndInterfaceFromFSProj.InsideLambda``
()
=
let
code
=
"""
...
...
@@ -212,7 +204,6 @@ module Test =
Assert
.
AreEqual
(
expected
,
quickInfo
)
()
// migrated from legacy test
[<
Test
>]
let
``Automation.TupleRecordFromFSBrowse.InsideComputationExpression``
()
=
let
code
=
"""
...
...
@@ -237,7 +228,6 @@ module Test =
Assert
.
AreEqual
(
expected
,
quickInfo
)
()
// migrated from legacy test
[<
Test
>]
let
``Automation.TupleRecordFromFSBrowse.SequenceOfMethods``
()
=
let
code
=
"""
...
...
@@ -266,7 +256,6 @@ module Test =
Assert
.
AreEqual
(
expected
,
quickInfo
)
()
// migrated from legacy test
[<
Test
>]
let
``Automation.UnionAndStructFromFSProj.MatchExpression``
()
=
let
code
=
"""
...
...
@@ -289,7 +278,6 @@ module Test =
Assert
.
AreEqual
(
expected
,
quickInfo
)
()
// migrated from legacy test
[<
Test
>]
let
``Automation.UnionAndStructFromFSProj.MatchPattern``
()
=
let
code
=
"""
...
...
@@ -312,7 +300,6 @@ module Test =
Assert
.
AreEqual
(
expected
,
quickInfo
)
()
// migrated from legacy test
[<
Test
>]
let
``Automation.UnionAndStructFromFSProj.UnionIfPredicate``
()
=
let
code
=
"""
...
...
@@ -334,7 +321,6 @@ module Test =
Assert
.
AreEqual
(
expected
,
quickInfo
)
()
// migrated from legacy test
[<
Test
>]
let
``Automation.UnionAndStructFromFSProj.UnionForPattern``
()
=
let
code
=
"""
...
...
@@ -356,7 +342,6 @@ module Test =
Assert
.
AreEqual
(
expected
,
quickInfo
)
()
// migrated from legacy test
[<
Test
>]
let
``Automation.UnionAndStructFromFSProj.UnionMethodPatternMatch``
()
=
let
code
=
"""
...
...
@@ -386,7 +371,6 @@ module Test =
Assert
.
AreEqual
(
expected
,
quickInfo
)
()
// migrated from legacy test
[<
Test
>]
let
``Automation.UnionAndStructFromFSProj.UnionMethodPatternMatchBody``
()
=
let
code
=
"""
...
...
@@ -414,7 +398,6 @@ module Test =
Assert
.
AreEqual
(
expected
,
quickInfo
)
()
// migrated from legacy test
[<
Test
>]
let
``Automation.UnionAndStructFromFSProj.UnionPropertyInComputationExpression``
()
=
let
code
=
"""
...
...
@@ -444,3 +427,35 @@ module Test =
let
expected
=
"property MyDistance.asNautical: MyDistance with get"
Assert
.
AreEqual
(
expected
,
quickInfo
)
()
[<
Test
>]
let
``Automation.LetBindings.InsideModule``
()
=
let
code
=
"""
namespace FsTest
module Test =
let fu$$nc x = ()
"""
let
expectedSignature
=
"val func: x: 'a -> unit"
let
tooltip
=
GetQuickInfoTextFromCode
code
StringAssert
.
StartsWith
(
expectedSignature
,
tooltip
)
()
[<
Test
>]
let
``Automation.LetBindings.InsideType``
()
=
let
code
=
"""
namespace FsTest
module Test =
type T() =
let fu$$nc x = ()
"""
let
expectedSignature
=
"val func: x: 'a -> unit"
let
tooltip
=
GetQuickInfoTextFromCode
code
StringAssert
.
StartsWith
(
expectedSignature
,
tooltip
)
()
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录