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

Commitd4dd838

Browse files
committed
added test for settable extension property
1 parent5edc7cc commitd4dd838

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

‎vsintegration/src/unittests/Tests.LanguageService.Completion.fs‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -544,6 +544,20 @@ type AutoCompletionListTests() as this =
544544
AssertCtrlSpaceCompleteContains(typeDef4@["new M.A<_, _>(S = 1)"])"A<_, _>(S = 1"[]["NonSettableProperty";"SettableProperty"]
545545
AssertCtrlSpaceCompleteContains(typeDef4@["new M.A<_, _>(S = 1,)"])"A<_, _>(S = 1,"["AnotherSettableProperty"]["NonSettableProperty"]
546546

547+
[<Test>]
548+
[<Category("Completion in object initializer")>]
549+
memberpublicthis.``ObjectInitializer.CompletionForSettableExtensionProperties``()=
550+
lettypeDef=
551+
[
552+
"type A() = member this.SetXYZ(v: int) = ()"
553+
"module Ext = type A with member this.XYZ with set(v) = this.SetXYZ(v)"
554+
555+
]
556+
557+
AssertCtrlSpaceCompleteContains(typeDef@["open Ext";"A((**))"])"A((**)"["XYZ"][]// positive
558+
AssertCtrlSpaceCompleteContains(typeDef@["A((**))"])"A((**)"[]["XYZ"]// negative
559+
560+
547561
[<Test>]
548562
[<Category("RangeOperator")>]
549563
memberpublicthis.``RangeOperator.CorrectUsage``()=

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp