From c725a482a454ed6c9b2f473b00523998bc6f9db3 Mon Sep 17 00:00:00 2001 From: realmarv Date: Thu, 24 Nov 2022 13:14:25 +0330 Subject: [PATCH] FShapLint.Core.Tests: test for private member --- .../Conventions/UsedUnderscorePrefixedElements.fs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/FSharpLint.Core.Tests/Rules/Conventions/UsedUnderscorePrefixedElements.fs b/tests/FSharpLint.Core.Tests/Rules/Conventions/UsedUnderscorePrefixedElements.fs index 5f5d312ac..a5114395d 100644 --- a/tests/FSharpLint.Core.Tests/Rules/Conventions/UsedUnderscorePrefixedElements.fs +++ b/tests/FSharpLint.Core.Tests/Rules/Conventions/UsedUnderscorePrefixedElements.fs @@ -49,5 +49,15 @@ type CustomerName(firstName) = printfn "%A" this._FirstName""" Assert.IsFalse this.ErrorsExist + + + member this.``Using private member with underscore prefix``() = + this.Parse """ +type CustomerName(firstName) = + member private this._FirstName = firstName + member this.MyFunc () = + printfn "%A" this._FirstName""" + + Assert.IsFalse this.ErrorsExist