Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/release-notes/.FSharp.Compiler.Service/11.0.100.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
* Fix parallel compilation of scripts ([PR #19649](https://github.com/dotnet/fsharp/pull/19649))
* Fix parser recovery, name resolution, and code completion for unfinished enum patterns ([PR #19708](https://github.com/dotnet/fsharp/pull/19708))
* Parser: fix unexpected diagnostics in debug builds, improve error messages ([PR #19730](https://github.com/dotnet/fsharp/pull/19730))
* Fix false FS1113 error on inline instance members when a class-scope self identifier (`as self`) is present. ([Issue #17899](https://github.com/dotnet/fsharp/issues/17899), [PR #19761](https://github.com/dotnet/fsharp/pull/19761))
* Fix signature conformance: overloaded member with unit parameter `M(())` now matches sig `member M: unit -> unit`. ([Issue #19596](https://github.com/dotnet/fsharp/issues/19596), [PR #19615](https://github.com/dotnet/fsharp/pull/19615))

### Added
Expand Down
2 changes: 1 addition & 1 deletion src/Compiler/Optimize/Optimizer.fs
Original file line number Diff line number Diff line change
Expand Up @@ -496,7 +496,7 @@ let rec IsPartialExprVal x =
| SizeValue (_, a) -> IsPartialExprVal a

let CheckInlineValueIsComplete (v: Val) res =
if v.ShouldInline && IsPartialExprVal res then
if v.ShouldInline && not v.IsMember && IsPartialExprVal res then
errorR(Error(FSComp.SR.optValueMarkedInlineButIncomplete(v.DisplayName), v.Range))
//System.Diagnostics.Debug.Assert(false, sprintf "Break for incomplete inline value %s" v.DisplayName)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,25 @@ open FSharp.Test.Compiler

module MemberDeclarations =

[<Fact>]
let ``Inline member with class-scope self identifier should compile`` () =
FSharp """
module Test

type TestClass1() as SomeSelfIdentifier =
member inline AnotherSelfIdentifier.test() = 5

type TestClass2() as self =
member inline self.test() = 5

type TestClass3() as self =
member inline _.test() = 5
"""
|> asLibrary
|> ignoreWarnings
|> compile
|> shouldSucceed

// Error tests

[<Theory; FileInlineData("E_byref_two_arguments_curried.fsx")>]
Expand Down
Loading