From ea55bc1f1764f0158b241230fba83d2cb2f05761 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 18 May 2026 11:23:04 +0000 Subject: [PATCH 1/4] Initial plan From 5f72fc7410ef4a6b4ce717658c903bfe9af6591a Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 18 May 2026 12:33:16 +0000 Subject: [PATCH 2/4] Fix FS1113 for inline instance members with class-scope self identifiers Agent-Logs-Url: https://github.com/dotnet/fsharp/sessions/02501657-eda7-4d68-a5d4-af85e644c220 Co-authored-by: T-Gro <46543583+T-Gro@users.noreply.github.com> --- src/Compiler/Optimize/Optimizer.fs | 2 +- .../MemberDeclarations/MemberDeclarations.fs | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/src/Compiler/Optimize/Optimizer.fs b/src/Compiler/Optimize/Optimizer.fs index 3cbb574598c..f0a94c66516 100644 --- a/src/Compiler/Optimize/Optimizer.fs +++ b/src/Compiler/Optimize/Optimizer.fs @@ -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) diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/ObjectOrientedTypeDefinitions/ClassTypes/MemberDeclarations/MemberDeclarations.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/ObjectOrientedTypeDefinitions/ClassTypes/MemberDeclarations/MemberDeclarations.fs index d69fb460957..03f225ee4d1 100644 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/ObjectOrientedTypeDefinitions/ClassTypes/MemberDeclarations/MemberDeclarations.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/ObjectOrientedTypeDefinitions/ClassTypes/MemberDeclarations/MemberDeclarations.fs @@ -8,6 +8,25 @@ open FSharp.Test.Compiler module MemberDeclarations = + [] + 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 [] From f39a8884cfe816a67684160cee124a6066b9d511 Mon Sep 17 00:00:00 2001 From: Tomas Grosup Date: Mon, 25 May 2026 13:51:27 +0200 Subject: [PATCH 3/4] Add release notes for FS1113 inline member fix Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- docs/release-notes/.FSharp.Compiler.Service/11.0.100.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/release-notes/.FSharp.Compiler.Service/11.0.100.md b/docs/release-notes/.FSharp.Compiler.Service/11.0.100.md index 4a6110cf514..e0d25327ce7 100644 --- a/docs/release-notes/.FSharp.Compiler.Service/11.0.100.md +++ b/docs/release-notes/.FSharp.Compiler.Service/11.0.100.md @@ -54,6 +54,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)) ### Added From 34c9c120883a3cc84d0fe2091f0ba7e7771bfa6b Mon Sep 17 00:00:00 2001 From: Tomas Grosup Date: Mon, 25 May 2026 16:43:23 +0200 Subject: [PATCH 4/4] Retry CI: MacOS agent was abandoned (infra failure) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>