bug 686206: F# property signature is missing 'static' keyword (#646)

* Fix bug 686206

* update

* update

* update

* clean before build

* update tests

Co-authored-by: Min Huang <huangmin@microsoft.com>
This commit is contained in:
v-susu1 2022-08-09 18:12:23 +08:00 коммит произвёл GitHub
Родитель afdf849020
Коммит 53df4b8a7c
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
6 изменённых файлов: 17 добавлений и 8 удалений

Просмотреть файл

@ -113,7 +113,7 @@ stages:
displayName: Run Unit and Integration Tests
inputs:
targetType: 'inline'
script: 'make prepare all check CONFIGURATION=$(buildConfiguration)'
script: 'make prepare clean all check CONFIGURATION=$(buildConfiguration)'
- task: EsrpCodeSigning@1
displayName: Sign executable and dll files

Просмотреть файл

@ -734,7 +734,16 @@ namespace Mono.Documentation.Updater
if (isField)
buf.Append("val ");
else
buf.Append("member this.");
{
if (property.GetMethod?.IsStatic ?? false)
{
buf.Append("static member ");
}
else
{
buf.Append("member this.");
}
}
}
buf.Append(DocUtils.GetPropertyName(property, NestedTypeSeparator));

Просмотреть файл

@ -44,7 +44,7 @@
<MemberSignature Language="ILAsm" Value=".property class System.Windows.RoutedEvent NeedsCleaningEvent" />
<MemberSignature Language="DocId" Value="P:AttachedEventsAndProperties.AquariumFilter.NeedsCleaningEvent" />
<MemberSignature Language="VB.NET" Value="Public Shared Property NeedsCleaningEvent As RoutedEvent" />
<MemberSignature Language="F#" Value="member this.NeedsCleaningEvent : System.Windows.RoutedEvent with get, set" Usage="AttachedEventsAndProperties.AquariumFilter.NeedsCleaningEvent" />
<MemberSignature Language="F#" Value="static member NeedsCleaningEvent : System.Windows.RoutedEvent with get, set" Usage="AttachedEventsAndProperties.AquariumFilter.NeedsCleaningEvent" />
<MemberSignature Language="JavaScript" Usage="var routedEvent = AquariumFilter.needsCleaningEvent;&#xA;AquariumFilter.needsCleaningEvent = routedEvent;" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; static property System::Windows::RoutedEvent ^ NeedsCleaningEvent { System::Windows::RoutedEvent ^ get(); void set(System::Windows::RoutedEvent ^ value); };" />
<MemberSignature Language="C++ WINRT" Value="static System::Windows::RoutedEvent NeedsCleaningEvent();&#xA;&#xA;static void NeedsCleaningEvent(System::Windows::RoutedEvent value);" />

Просмотреть файл

@ -170,7 +170,7 @@
<MemberSignature Language="ILAsm" Value=".property bool IsDuplicated" />
<MemberSignature Language="DocId" Value="P:AttachedEventsAndProperties.AttachedPropertyExample.IsDuplicated" />
<MemberSignature Language="VB.NET" Value="Public Shared Property IsDuplicated As Boolean" />
<MemberSignature Language="F#" Value="member this.IsDuplicated : bool with get, set" Usage="AttachedEventsAndProperties.AttachedPropertyExample.IsDuplicated" />
<MemberSignature Language="F#" Value="static member IsDuplicated : bool with get, set" Usage="AttachedEventsAndProperties.AttachedPropertyExample.IsDuplicated" />
<MemberSignature Language="JavaScript" Usage="var boolean = AttachedPropertyExample.isDuplicated;&#xA;AttachedPropertyExample.isDuplicated = boolean;" />
<MemberSignature Language="C++ CLI" Value="public:&#xA; static property bool IsDuplicated { bool get(); void set(bool value); };" />
<MemberSignature Language="C++ CX" Value="public:&#xA; static property bool IsDuplicated { bool get(); void set(bool value); };" />

Просмотреть файл

@ -317,7 +317,7 @@
<Member MemberName="Large">
<MemberSignature Language="C#" Value="public static DiscriminatedUnions.SizeUnion Large { get; }" />
<MemberSignature Language="ILAsm" Value=".property DiscriminatedUnions/SizeUnion Large" />
<MemberSignature Language="F#" Value="member this.Large : DiscriminatedUnions.SizeUnion" Usage="DiscriminatedUnions.SizeUnion.Large" />
<MemberSignature Language="F#" Value="static member Large : DiscriminatedUnions.SizeUnion" Usage="DiscriminatedUnions.SizeUnion.Large" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyVersion>1.0.0.0</AssemblyVersion>
@ -348,7 +348,7 @@
<Member MemberName="Medium">
<MemberSignature Language="C#" Value="public static DiscriminatedUnions.SizeUnion Medium { get; }" />
<MemberSignature Language="ILAsm" Value=".property DiscriminatedUnions/SizeUnion Medium" />
<MemberSignature Language="F#" Value="member this.Medium : DiscriminatedUnions.SizeUnion" Usage="DiscriminatedUnions.SizeUnion.Medium" />
<MemberSignature Language="F#" Value="static member Medium : DiscriminatedUnions.SizeUnion" Usage="DiscriminatedUnions.SizeUnion.Medium" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyVersion>1.0.0.0</AssemblyVersion>
@ -379,7 +379,7 @@
<Member MemberName="Small">
<MemberSignature Language="C#" Value="public static DiscriminatedUnions.SizeUnion Small { get; }" />
<MemberSignature Language="ILAsm" Value=".property DiscriminatedUnions/SizeUnion Small" />
<MemberSignature Language="F#" Value="member this.Small : DiscriminatedUnions.SizeUnion" Usage="DiscriminatedUnions.SizeUnion.Small" />
<MemberSignature Language="F#" Value="static member Small : DiscriminatedUnions.SizeUnion" Usage="DiscriminatedUnions.SizeUnion.Small" />
<MemberType>Property</MemberType>
<AssemblyInfo>
<AssemblyVersion>1.0.0.0</AssemblyVersion>

Просмотреть файл

@ -135,7 +135,7 @@ namespace mdoc.Test
public void TypeSignature_Union_5() =>
TestPropertySignature(
typeof(DiscriminatedUnions.SizeUnion),
"member this.Small : DiscriminatedUnions.SizeUnion",
"static member Small : DiscriminatedUnions.SizeUnion",
nameof(DiscriminatedUnions.SizeUnion.Small));
[Test]