From c36df853c21040e3948b612360154ecb997f7e52 Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Fri, 5 Dec 2025 01:50:04 +0000
Subject: [PATCH 1/9] Initial plan
From 7e962090658e5fe3b2f75845d7d44ba706fa4c3a Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Fri, 5 Dec 2025 02:00:53 +0000
Subject: [PATCH 2/9] Add AsyncHelpers compatibility shim for .NET 10 support
Co-authored-by: TheAngryByrd <1490044+TheAngryByrd@users.noreply.github.com>
---
src/FSharp.Core/FSharp.Core.fsproj | 6 ++
src/FSharp.Core/asynchelpers.fs | 53 +++++++++++
src/FSharp.Core/asynchelpers.fsi | 48 ++++++++++
.../FSharp.Core.UnitTests.fsproj | 1 +
.../Microsoft.FSharp.Control/AsyncHelpers.fs | 92 +++++++++++++++++++
5 files changed, 200 insertions(+)
create mode 100644 src/FSharp.Core/asynchelpers.fs
create mode 100644 src/FSharp.Core/asynchelpers.fsi
create mode 100644 tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Control/AsyncHelpers.fs
diff --git a/src/FSharp.Core/FSharp.Core.fsproj b/src/FSharp.Core/FSharp.Core.fsproj
index 0f9fe0fb624..dc538447a0b 100644
--- a/src/FSharp.Core/FSharp.Core.fsproj
+++ b/src/FSharp.Core/FSharp.Core.fsproj
@@ -211,6 +211,12 @@
Control/tasks.fs
+
+ Control/asynchelpers.fsi
+
+
+ Control/asynchelpers.fs
+
Control/eventmodule.fsi
diff --git a/src/FSharp.Core/asynchelpers.fs b/src/FSharp.Core/asynchelpers.fs
new file mode 100644
index 00000000000..e05d7ecb6f4
--- /dev/null
+++ b/src/FSharp.Core/asynchelpers.fs
@@ -0,0 +1,53 @@
+// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information.
+
+// Support for System.Runtime.CompilerServices.AsyncHelpers
+// This provides type-forwarding and compatibility shims for the new .NET 10 AsyncHelpers API
+
+namespace System.Runtime.CompilerServices
+
+open System
+open System.Threading.Tasks
+
+#if !NET10_0_OR_GREATER
+
+///
+/// Provides helper methods for consuming Tasks and ValueTasks synchronously.
+/// This is a compatibility shim for .NET versions prior to 10.0.
+/// When targeting .NET 10.0 or later, the runtime-provided implementation is used.
+///
+[]
+[]
+[]
+type AsyncHelpers =
+
+ ///
+ /// Synchronously waits for the task to complete and returns its result.
+ ///
+ /// The task to wait for.
+ /// The result of the completed task.
+ static member inline Await(task: Task<'T>) : 'T =
+ task.GetAwaiter().GetResult()
+
+ ///
+ /// Synchronously waits for the task to complete.
+ ///
+ /// The task to wait for.
+ static member inline Await(task: Task) : unit =
+ task.GetAwaiter().GetResult()
+
+ ///
+ /// Synchronously waits for the value task to complete and returns its result.
+ ///
+ /// The value task to wait for.
+ /// The result of the completed value task.
+ static member inline Await(task: ValueTask<'T>) : 'T =
+ task.GetAwaiter().GetResult()
+
+ ///
+ /// Synchronously waits for the value task to complete.
+ ///
+ /// The value task to wait for.
+ static member inline Await(task: ValueTask) : unit =
+ task.GetAwaiter().GetResult()
+
+#endif
diff --git a/src/FSharp.Core/asynchelpers.fsi b/src/FSharp.Core/asynchelpers.fsi
new file mode 100644
index 00000000000..478c2733eb2
--- /dev/null
+++ b/src/FSharp.Core/asynchelpers.fsi
@@ -0,0 +1,48 @@
+// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information.
+
+// Support for System.Runtime.CompilerServices.AsyncHelpers
+
+namespace System.Runtime.CompilerServices
+
+open System
+open System.Threading.Tasks
+
+#if !NET10_0_OR_GREATER
+
+///
+/// Provides helper methods for consuming Tasks and ValueTasks synchronously.
+/// This is a compatibility shim for .NET versions prior to 10.0.
+/// When targeting .NET 10.0 or later, the runtime-provided implementation is used.
+///
+[]
+[]
+[]
+type AsyncHelpers =
+
+ ///
+ /// Synchronously waits for the task to complete and returns its result.
+ ///
+ /// The task to wait for.
+ /// The result of the completed task.
+ static member Await: task: Task<'T> -> 'T
+
+ ///
+ /// Synchronously waits for the task to complete.
+ ///
+ /// The task to wait for.
+ static member Await: task: Task -> unit
+
+ ///
+ /// Synchronously waits for the value task to complete and returns its result.
+ ///
+ /// The value task to wait for.
+ /// The result of the completed value task.
+ static member Await: task: ValueTask<'T> -> 'T
+
+ ///
+ /// Synchronously waits for the value task to complete.
+ ///
+ /// The value task to wait for.
+ static member Await: task: ValueTask -> unit
+
+#endif
diff --git a/tests/FSharp.Core.UnitTests/FSharp.Core.UnitTests.fsproj b/tests/FSharp.Core.UnitTests/FSharp.Core.UnitTests.fsproj
index 9acbcef398e..3cf8d08064f 100644
--- a/tests/FSharp.Core.UnitTests/FSharp.Core.UnitTests.fsproj
+++ b/tests/FSharp.Core.UnitTests/FSharp.Core.UnitTests.fsproj
@@ -84,6 +84,7 @@
+
diff --git a/tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Control/AsyncHelpers.fs b/tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Control/AsyncHelpers.fs
new file mode 100644
index 00000000000..0205a6c16f9
--- /dev/null
+++ b/tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Control/AsyncHelpers.fs
@@ -0,0 +1,92 @@
+// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information.
+
+namespace FSharp.Core.UnitTests.Control
+
+open System
+open System.Threading
+open System.Threading.Tasks
+open System.Runtime.CompilerServices
+open Xunit
+
+#nowarn "57" // Experimental feature
+
+module AsyncHelpersTests =
+
+ []
+ let ``AsyncHelpers.Await should wait for Task and return result``() =
+ let task = Task.FromResult(42)
+ let result = AsyncHelpers.Await(task)
+ Assert.Equal(42, result)
+
+ []
+ let ``AsyncHelpers.Await should wait for completed Task``() =
+ let task = Task.CompletedTask
+ AsyncHelpers.Await(task)
+ // If we get here without exception, the test passed
+ Assert.True(true)
+
+ []
+ let ``AsyncHelpers.Await should wait for ValueTask and return result``() =
+ let vtask = ValueTask(42)
+ let result = AsyncHelpers.Await(vtask)
+ Assert.Equal(42, result)
+
+ []
+ let ``AsyncHelpers.Await should wait for ValueTask``() =
+ let vtask = ValueTask()
+ AsyncHelpers.Await(vtask)
+ // If we get here without exception, the test passed
+ Assert.True(true)
+
+ []
+ let ``AsyncHelpers.Await should work with delayed Task``() =
+ let task =
+ Task.Run(fun () ->
+ Thread.Sleep(10)
+ "hello")
+ let result = AsyncHelpers.Await(task)
+ Assert.Equal("hello", result)
+
+ []
+ let ``AsyncHelpers.Await should work with delayed Task``() =
+ let mutable completed = false
+ let task =
+ Task.Run(fun () ->
+ Thread.Sleep(10)
+ completed <- true)
+ AsyncHelpers.Await(task)
+ Assert.True(completed)
+
+ []
+ let ``AsyncHelpers.Await can be used in computation expression``() =
+ #nowarn "57"
+
+ type CEBuilder() =
+ member inline _.Return(x: 'T) : Task<'T> = Task.FromResult(x)
+
+ member inline _.Bind(t: Task<'T>, [] f: 'T -> Task<'U>) : Task<'U> =
+ let result = AsyncHelpers.Await t
+ f result
+
+ member inline _.Bind(t: Task, [] f: unit -> Task<'U>) : Task<'U> =
+ AsyncHelpers.Await t
+ f ()
+
+ member inline _.Delay([] f: unit -> Task<'T>) : Task<'T> =
+ f()
+
+ member inline _.Run(f: Task<'T>) : Task<'T> =
+ f
+
+ let ce = CEBuilder()
+
+ let test() =
+ ce {
+ let! x = Task.FromResult(21)
+ let! y = Task.FromResult(21)
+ return x + y
+ }
+
+ let result = test()
+ let finalResult = result.GetAwaiter().GetResult()
+ Assert.Equal(42, finalResult)
From c54049fe6acf6fa4c2bfbd8fef99a165c7a222a0 Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Fri, 5 Dec 2025 02:07:47 +0000
Subject: [PATCH 3/9] Remove AsyncHelpers stub and create implementation
checklist
Co-authored-by: TheAngryByrd <1490044+TheAngryByrd@users.noreply.github.com>
---
src/FSharp.Core/FSharp.Core.fsproj | 6 --
src/FSharp.Core/asynchelpers.fs | 53 -----------
src/FSharp.Core/asynchelpers.fsi | 48 ----------
.../Conformance/AsyncHelpers.fs | 87 ++++++++++++++++++
.../FSharp.Core.UnitTests.fsproj | 1 -
.../Microsoft.FSharp.Control/AsyncHelpers.fs | 92 -------------------
6 files changed, 87 insertions(+), 200 deletions(-)
delete mode 100644 src/FSharp.Core/asynchelpers.fs
delete mode 100644 src/FSharp.Core/asynchelpers.fsi
create mode 100644 tests/FSharp.Compiler.ComponentTests/Conformance/AsyncHelpers.fs
delete mode 100644 tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Control/AsyncHelpers.fs
diff --git a/src/FSharp.Core/FSharp.Core.fsproj b/src/FSharp.Core/FSharp.Core.fsproj
index dc538447a0b..0f9fe0fb624 100644
--- a/src/FSharp.Core/FSharp.Core.fsproj
+++ b/src/FSharp.Core/FSharp.Core.fsproj
@@ -211,12 +211,6 @@
Control/tasks.fs
-
- Control/asynchelpers.fsi
-
-
- Control/asynchelpers.fs
-
Control/eventmodule.fsi
diff --git a/src/FSharp.Core/asynchelpers.fs b/src/FSharp.Core/asynchelpers.fs
deleted file mode 100644
index e05d7ecb6f4..00000000000
--- a/src/FSharp.Core/asynchelpers.fs
+++ /dev/null
@@ -1,53 +0,0 @@
-// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information.
-
-// Support for System.Runtime.CompilerServices.AsyncHelpers
-// This provides type-forwarding and compatibility shims for the new .NET 10 AsyncHelpers API
-
-namespace System.Runtime.CompilerServices
-
-open System
-open System.Threading.Tasks
-
-#if !NET10_0_OR_GREATER
-
-///
-/// Provides helper methods for consuming Tasks and ValueTasks synchronously.
-/// This is a compatibility shim for .NET versions prior to 10.0.
-/// When targeting .NET 10.0 or later, the runtime-provided implementation is used.
-///
-[]
-[]
-[]
-type AsyncHelpers =
-
- ///
- /// Synchronously waits for the task to complete and returns its result.
- ///
- /// The task to wait for.
- /// The result of the completed task.
- static member inline Await(task: Task<'T>) : 'T =
- task.GetAwaiter().GetResult()
-
- ///
- /// Synchronously waits for the task to complete.
- ///
- /// The task to wait for.
- static member inline Await(task: Task) : unit =
- task.GetAwaiter().GetResult()
-
- ///
- /// Synchronously waits for the value task to complete and returns its result.
- ///
- /// The value task to wait for.
- /// The result of the completed value task.
- static member inline Await(task: ValueTask<'T>) : 'T =
- task.GetAwaiter().GetResult()
-
- ///
- /// Synchronously waits for the value task to complete.
- ///
- /// The value task to wait for.
- static member inline Await(task: ValueTask) : unit =
- task.GetAwaiter().GetResult()
-
-#endif
diff --git a/src/FSharp.Core/asynchelpers.fsi b/src/FSharp.Core/asynchelpers.fsi
deleted file mode 100644
index 478c2733eb2..00000000000
--- a/src/FSharp.Core/asynchelpers.fsi
+++ /dev/null
@@ -1,48 +0,0 @@
-// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information.
-
-// Support for System.Runtime.CompilerServices.AsyncHelpers
-
-namespace System.Runtime.CompilerServices
-
-open System
-open System.Threading.Tasks
-
-#if !NET10_0_OR_GREATER
-
-///
-/// Provides helper methods for consuming Tasks and ValueTasks synchronously.
-/// This is a compatibility shim for .NET versions prior to 10.0.
-/// When targeting .NET 10.0 or later, the runtime-provided implementation is used.
-///
-[]
-[]
-[]
-type AsyncHelpers =
-
- ///
- /// Synchronously waits for the task to complete and returns its result.
- ///
- /// The task to wait for.
- /// The result of the completed task.
- static member Await: task: Task<'T> -> 'T
-
- ///
- /// Synchronously waits for the task to complete.
- ///
- /// The task to wait for.
- static member Await: task: Task -> unit
-
- ///
- /// Synchronously waits for the value task to complete and returns its result.
- ///
- /// The value task to wait for.
- /// The result of the completed value task.
- static member Await: task: ValueTask<'T> -> 'T
-
- ///
- /// Synchronously waits for the value task to complete.
- ///
- /// The value task to wait for.
- static member Await: task: ValueTask -> unit
-
-#endif
diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/AsyncHelpers.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/AsyncHelpers.fs
new file mode 100644
index 00000000000..48191ce1160
--- /dev/null
+++ b/tests/FSharp.Compiler.ComponentTests/Conformance/AsyncHelpers.fs
@@ -0,0 +1,87 @@
+// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information.
+
+namespace FSharp.Compiler.ComponentTests.Conformance
+
+open Xunit
+open FSharp.Test.Compiler
+
+module AsyncHelpersTests =
+
+ // This test verifies that F# can compile code that uses AsyncHelpers
+ // when targeting .NET 10+ (when AsyncHelpers becomes available)
+ []
+ let ``Code using AsyncHelpers should compile with appropriate warnings`` () =
+ let code = """
+module TestModule
+
+open System
+open System.Runtime.CompilerServices
+open System.Threading.Tasks
+
+#nowarn "57"
+
+type CEBuilder() =
+ member inline _.Return(x: 'T) : Task<'T> = Task.FromResult(x)
+
+ member inline _.Bind(t: Task<'T>, [] f: 'T -> Task<'U>) : Task<'U> =
+ AsyncHelpers.Await t
+ |> f
+
+ member inline _.Bind(t: Task, [] f: unit -> Task<'U>) : Task<'U> =
+ AsyncHelpers.Await t
+ |> f
+
+ member inline _.Delay([]f: unit -> Task<'T>) : Task<'T> = f()
+
+ []
+ member inline _.Run(f: Task<'T>) : Task<'T> = f
+
+let ce = CEBuilder()
+
+let test() =
+ ce {
+ do! Task.Delay 100
+ return 42
+ }
+
+[]
+let main _ = 0
+"""
+ // This test documents that the code structure is valid F# syntax
+ // The actual AsyncHelpers.Await calls will only work when targeting .NET 10+
+ // For now, we expect a compilation error about AsyncHelpers not being defined
+ FSharp
+ |> withLangVersionPreview
+ |> asExe
+ |> withCode code
+ |> typecheck
+ |> shouldFail
+ |> ignore
+
+ []
+ let ``InlineIfLambda attribute should be recognized`` () =
+ let code = """
+module TestModule
+
+open System.Runtime.CompilerServices
+
+type Builder() =
+ member inline _.Bind(x: int, [] f: int -> int) : int =
+ f x
+
+ member inline _.Return(x: int) : int = x
+
+let builder = Builder()
+
+let test() =
+ builder {
+ let! x = 42
+ return x
+ }
+"""
+ FSharp
+ |> withLangVersionPreview
+ |> asExe
+ |> withCode code
+ |> compile
+ |> shouldSucceed
diff --git a/tests/FSharp.Core.UnitTests/FSharp.Core.UnitTests.fsproj b/tests/FSharp.Core.UnitTests/FSharp.Core.UnitTests.fsproj
index 3cf8d08064f..9acbcef398e 100644
--- a/tests/FSharp.Core.UnitTests/FSharp.Core.UnitTests.fsproj
+++ b/tests/FSharp.Core.UnitTests/FSharp.Core.UnitTests.fsproj
@@ -84,7 +84,6 @@
-
diff --git a/tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Control/AsyncHelpers.fs b/tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Control/AsyncHelpers.fs
deleted file mode 100644
index 0205a6c16f9..00000000000
--- a/tests/FSharp.Core.UnitTests/FSharp.Core/Microsoft.FSharp.Control/AsyncHelpers.fs
+++ /dev/null
@@ -1,92 +0,0 @@
-// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information.
-
-namespace FSharp.Core.UnitTests.Control
-
-open System
-open System.Threading
-open System.Threading.Tasks
-open System.Runtime.CompilerServices
-open Xunit
-
-#nowarn "57" // Experimental feature
-
-module AsyncHelpersTests =
-
- []
- let ``AsyncHelpers.Await should wait for Task and return result``() =
- let task = Task.FromResult(42)
- let result = AsyncHelpers.Await(task)
- Assert.Equal(42, result)
-
- []
- let ``AsyncHelpers.Await should wait for completed Task``() =
- let task = Task.CompletedTask
- AsyncHelpers.Await(task)
- // If we get here without exception, the test passed
- Assert.True(true)
-
- []
- let ``AsyncHelpers.Await should wait for ValueTask and return result``() =
- let vtask = ValueTask(42)
- let result = AsyncHelpers.Await(vtask)
- Assert.Equal(42, result)
-
- []
- let ``AsyncHelpers.Await should wait for ValueTask``() =
- let vtask = ValueTask()
- AsyncHelpers.Await(vtask)
- // If we get here without exception, the test passed
- Assert.True(true)
-
- []
- let ``AsyncHelpers.Await should work with delayed Task``() =
- let task =
- Task.Run(fun () ->
- Thread.Sleep(10)
- "hello")
- let result = AsyncHelpers.Await(task)
- Assert.Equal("hello", result)
-
- []
- let ``AsyncHelpers.Await should work with delayed Task``() =
- let mutable completed = false
- let task =
- Task.Run(fun () ->
- Thread.Sleep(10)
- completed <- true)
- AsyncHelpers.Await(task)
- Assert.True(completed)
-
- []
- let ``AsyncHelpers.Await can be used in computation expression``() =
- #nowarn "57"
-
- type CEBuilder() =
- member inline _.Return(x: 'T) : Task<'T> = Task.FromResult(x)
-
- member inline _.Bind(t: Task<'T>, [] f: 'T -> Task<'U>) : Task<'U> =
- let result = AsyncHelpers.Await t
- f result
-
- member inline _.Bind(t: Task, [] f: unit -> Task<'U>) : Task<'U> =
- AsyncHelpers.Await t
- f ()
-
- member inline _.Delay([] f: unit -> Task<'T>) : Task<'T> =
- f()
-
- member inline _.Run(f: Task<'T>) : Task<'T> =
- f
-
- let ce = CEBuilder()
-
- let test() =
- ce {
- let! x = Task.FromResult(21)
- let! y = Task.FromResult(21)
- return x + y
- }
-
- let result = test()
- let finalResult = result.GetAwaiter().GetResult()
- Assert.Equal(42, finalResult)
From 2f44b61dd97a90053d9ca0d1cc34e9470d6847d6 Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Fri, 5 Dec 2025 02:10:38 +0000
Subject: [PATCH 4/9] Add IL support for MethodImplOptions.Async flag (0x2000)
Co-authored-by: TheAngryByrd <1490044+TheAngryByrd@users.noreply.github.com>
---
src/Compiler/AbstractIL/il.fs | 8 ++++++++
src/Compiler/AbstractIL/il.fsi | 6 ++++++
2 files changed, 14 insertions(+)
diff --git a/src/Compiler/AbstractIL/il.fs b/src/Compiler/AbstractIL/il.fs
index fecefad1434..0b4c66ef35f 100644
--- a/src/Compiler/AbstractIL/il.fs
+++ b/src/Compiler/AbstractIL/il.fs
@@ -2073,6 +2073,10 @@ type ILMethodDef
member x.IsMustRun = x.ImplAttributes &&& MethodImplAttributes.NoOptimization <> enum 0
+ /// Check if method is marked with MethodImplOptions.Async (0x2000)
+ /// This indicates the method uses runtime-async support (.NET 10+)
+ member x.IsAsync = x.ImplAttributes &&& enum(0x2000) <> enum 0
+
member x.WithSpecialName =
x.With(attributes = (x.Attributes ||| MethodAttributes.SpecialName))
@@ -2132,6 +2136,10 @@ type ILMethodDef
member x.WithRuntime(condition) =
x.With(implAttributes = (x.ImplAttributes |> conditionalAdd condition MethodImplAttributes.Runtime))
+ /// Set the Async flag (MethodImplOptions.Async = 0x2000) for runtime-async support (.NET 10+)
+ member x.WithAsync(condition) =
+ x.With(implAttributes = (x.ImplAttributes |> conditionalAdd condition (enum(0x2000))))
+
[]
member x.DebugText = x.ToString()
diff --git a/src/Compiler/AbstractIL/il.fsi b/src/Compiler/AbstractIL/il.fsi
index 5e02f4c0c1e..72e3d25790c 100644
--- a/src/Compiler/AbstractIL/il.fsi
+++ b/src/Compiler/AbstractIL/il.fsi
@@ -1134,6 +1134,9 @@ type ILMethodDef =
/// SafeHandle finalizer must be run.
member IsMustRun: bool
+ /// Indicates method uses runtime-async support (MethodImplOptions.Async = 0x2000, .NET 10+)
+ member IsAsync: bool
+
/// Functional update of the value
member internal With:
?name: string *
@@ -1179,6 +1182,9 @@ type ILMethodDef =
member internal WithRuntime: bool -> ILMethodDef
+ /// Set the Async flag (MethodImplOptions.Async = 0x2000) for runtime-async support (.NET 10+)
+ member internal WithAsync: bool -> ILMethodDef
+
/// Tables of methods. Logically equivalent to a list of methods but
/// the table is kept in a form optimized for looking up methods by
/// name and arity.
From 711c956d6d7ebb8f76ae9549d47385d5430e18f5 Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Fri, 5 Dec 2025 02:15:28 +0000
Subject: [PATCH 5/9] Add code generation support for MethodImplOptions.Async
flag
Co-authored-by: TheAngryByrd <1490044+TheAngryByrd@users.noreply.github.com>
---
src/Compiler/CodeGen/IlxGen.fs | 16 +++++++++++-----
1 file changed, 11 insertions(+), 5 deletions(-)
diff --git a/src/Compiler/CodeGen/IlxGen.fs b/src/Compiler/CodeGen/IlxGen.fs
index 5c174ecf9de..ae6a7e616d5 100644
--- a/src/Compiler/CodeGen/IlxGen.fs
+++ b/src/Compiler/CodeGen/IlxGen.fs
@@ -9002,8 +9002,11 @@ and ComputeMethodImplAttribs cenv (_v: Val) attrs =
// strip the MethodImpl pseudo-custom attribute
// The following method implementation flags are used here
- // 0x80 - hasPreserveSigImplFlag
- // 0x20 - synchronize
+ // 0x0008 - no inlining
+ // 0x0020 - synchronize
+ // 0x0080 - preserve sig
+ // 0x0100 - aggressive inlining
+ // 0x2000 - async (runtime-async support, .NET 10+)
// (See ECMA 335, Partition II, section 23.1.11 - Flags for methods [MethodImplAttributes])
let attrs =
attrs
@@ -9014,7 +9017,8 @@ and ComputeMethodImplAttribs cenv (_v: Val) attrs =
let hasSynchronizedImplFlag = (implflags &&& 0x20) <> 0x0
let hasNoInliningImplFlag = (implflags &&& 0x08) <> 0x0
let hasAggressiveInliningImplFlag = (implflags &&& 0x0100) <> 0x0
- hasPreserveSigImplFlag, hasSynchronizedImplFlag, hasNoInliningImplFlag, hasAggressiveInliningImplFlag, attrs
+ let hasAsyncImplFlag = (implflags &&& 0x2000) <> 0x0
+ hasPreserveSigImplFlag, hasSynchronizedImplFlag, hasNoInliningImplFlag, hasAggressiveInliningImplFlag, hasAsyncImplFlag, attrs
and GenMethodForBinding
cenv
@@ -9197,7 +9201,7 @@ and GenMethodForBinding
| _ -> [], None
// check if the hasPreserveSigNamedArg and hasSynchronizedImplFlag implementation flags have been specified
- let hasPreserveSigImplFlag, hasSynchronizedImplFlag, hasNoInliningFlag, hasAggressiveInliningImplFlag, attrs =
+ let hasPreserveSigImplFlag, hasSynchronizedImplFlag, hasNoInliningFlag, hasAggressiveInliningImplFlag, hasAsyncImplFlag, attrs =
ComputeMethodImplAttribs cenv v attrs
let securityAttributes, attrs =
@@ -9474,6 +9478,7 @@ and GenMethodForBinding
.WithSynchronized(hasSynchronizedImplFlag)
.WithNoInlining(hasNoInliningFlag)
.WithAggressiveInlining(hasAggressiveInliningImplFlag)
+ .WithAsync(hasAsyncImplFlag)
.With(isEntryPoint = isExplicitEntryPoint, securityDecls = secDecls)
let mdef =
@@ -10546,7 +10551,7 @@ and GenAbstractBinding cenv eenv tref (vref: ValRef) =
let memberInfo = Option.get vref.MemberInfo
let attribs = vref.Attribs
- let hasPreserveSigImplFlag, hasSynchronizedImplFlag, hasNoInliningFlag, hasAggressiveInliningImplFlag, attribs =
+ let hasPreserveSigImplFlag, hasSynchronizedImplFlag, hasNoInliningFlag, hasAggressiveInliningImplFlag, hasAsyncImplFlag, attribs =
ComputeMethodImplAttribs cenv vref.Deref attribs
if memberInfo.MemberFlags.IsDispatchSlot && not memberInfo.IsImplemented then
@@ -10602,6 +10607,7 @@ and GenAbstractBinding cenv eenv tref (vref: ValRef) =
.WithSynchronized(hasSynchronizedImplFlag)
.WithNoInlining(hasNoInliningFlag)
.WithAggressiveInlining(hasAggressiveInliningImplFlag)
+ .WithAsync(hasAsyncImplFlag)
match memberInfo.MemberFlags.MemberKind with
| SynMemberKind.ClassConstructor
From 3ed06d073e4d6cee5e21ac2051e2958e51424f22 Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Fri, 5 Dec 2025 04:51:22 +0000
Subject: [PATCH 6/9] Add IL verification tests for MethodImplOptions.Async and
update ILDasm to .NET 10
Co-authored-by: TheAngryByrd <1490044+TheAngryByrd@users.noreply.github.com>
---
.../MethodImplAttribute/MethodImplAttribute.Async.fs | 6 ++++++
.../MethodImplAttribute.AsyncWithTask.fs | 12 ++++++++++++
.../MethodImplAttribute/MethodImplAttribute.fs | 12 ++++++++++++
tests/FSharp.Test.Utilities/TestFramework.fs | 2 +-
4 files changed, 31 insertions(+), 1 deletion(-)
create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/MethodImplAttribute/MethodImplAttribute.Async.fs
create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/MethodImplAttribute/MethodImplAttribute.AsyncWithTask.fs
diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/MethodImplAttribute/MethodImplAttribute.Async.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/MethodImplAttribute/MethodImplAttribute.Async.fs
new file mode 100644
index 00000000000..7bfa0c4c3fc
--- /dev/null
+++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/MethodImplAttribute/MethodImplAttribute.Async.fs
@@ -0,0 +1,6 @@
+// Test for MethodImplOptions.Async (0x2000) - Runtime-Async support (.NET 10+)
+module M
+open System.Threading.Tasks
+
+[]
+let asyncMethod () : Task = Task.FromResult(42)
diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/MethodImplAttribute/MethodImplAttribute.AsyncWithTask.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/MethodImplAttribute/MethodImplAttribute.AsyncWithTask.fs
new file mode 100644
index 00000000000..4b364414bef
--- /dev/null
+++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/MethodImplAttribute/MethodImplAttribute.AsyncWithTask.fs
@@ -0,0 +1,12 @@
+// Test for MethodImplOptions.Async with Task return type
+module AsyncTaskTest
+open System.Threading.Tasks
+
+type TestClass() =
+ []
+ member _.AsyncInstanceMethod() : Task =
+ Task.FromResult("hello")
+
+ []
+ static member AsyncStaticMethod() : Task =
+ Task.FromResult(100)
diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/MethodImplAttribute/MethodImplAttribute.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/MethodImplAttribute/MethodImplAttribute.fs
index a13fee6baaf..f55ef16bb3c 100644
--- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/MethodImplAttribute/MethodImplAttribute.fs
+++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/MethodImplAttribute/MethodImplAttribute.fs
@@ -77,3 +77,15 @@ module MethodImplAttribute =
let ``Unmanaged_fs`` compilation =
compilation
|> verifyCompilation
+
+ // SOURCE=MethodImplAttribute.Async.fs SCFLAGS="-a -g --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd MethodImplAttribute.Async.dll" # MethodImplAttribute.Async.fs - .NET 10 Runtime-Async
+ []
+ let ``Async_fs`` compilation =
+ compilation
+ |> verifyCompilation
+
+ // SOURCE=MethodImplAttribute.AsyncWithTask.fs SCFLAGS="-a -g --optimize-" COMPILE_ONLY=1 POSTCMD="..\\CompareIL.cmd MethodImplAttribute.AsyncWithTask.dll" # MethodImplAttribute.AsyncWithTask.fs - .NET 10 Runtime-Async with Task
+ []
+ let ``AsyncWithTask_fs`` compilation =
+ compilation
+ |> verifyCompilation
diff --git a/tests/FSharp.Test.Utilities/TestFramework.fs b/tests/FSharp.Test.Utilities/TestFramework.fs
index f7ec7f48001..d0de94ad896 100644
--- a/tests/FSharp.Test.Utilities/TestFramework.fs
+++ b/tests/FSharp.Test.Utilities/TestFramework.fs
@@ -315,7 +315,7 @@ let config configurationName envVars =
let repoRoot = SCRIPT_ROOT ++ ".." ++ ".."
let artifactsPath = repoRoot ++ "artifacts"
let artifactsBinPath = artifactsPath ++ "bin"
- let coreClrRuntimePackageVersion = "5.0.0-preview.7.20364.11"
+ let coreClrRuntimePackageVersion = "10.0.0"
let csc_flags = "/nologo"
let vbc_flags = "/nologo"
let fsc_flags = "-r:System.Core.dll --nowarn:20 --define:COMPILED --preferreduilang:en-US"
From 1dce38e0a772df962e9eb338cd2109f3c24d04bb Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Fri, 5 Dec 2025 04:54:54 +0000
Subject: [PATCH 7/9] Add IL baseline files for async flag verification
Co-authored-by: TheAngryByrd <1490044+TheAngryByrd@users.noreply.github.com>
---
.../MethodImplAttribute.Async.fs.il.bsl | 67 +++++++++++++
...ethodImplAttribute.AsyncWithTask.fs.il.bsl | 96 +++++++++++++++++++
2 files changed, 163 insertions(+)
create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/MethodImplAttribute/MethodImplAttribute.Async.fs.il.bsl
create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/MethodImplAttribute/MethodImplAttribute.AsyncWithTask.fs.il.bsl
diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/MethodImplAttribute/MethodImplAttribute.Async.fs.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/MethodImplAttribute/MethodImplAttribute.Async.fs.il.bsl
new file mode 100644
index 00000000000..0165d2a4e4b
--- /dev/null
+++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/MethodImplAttribute/MethodImplAttribute.Async.fs.il.bsl
@@ -0,0 +1,67 @@
+.assembly extern runtime { }
+.assembly extern FSharp.Core { }
+.assembly assembly
+{
+ .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32,
+ int32,
+ int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 )
+
+
+
+
+ .hash algorithm 0x00008004
+ .ver 0:0:0:0
+}
+.mresource public FSharpSignatureData.assembly
+{
+
+
+}
+.mresource public FSharpOptimizationData.assembly
+{
+
+
+}
+.module assembly.exe
+
+.imagebase {value}
+.file alignment 0x00000200
+.stackreserve 0x00100000
+.subsystem 0x0003
+.corflags 0x00000001
+
+
+
+
+
+.class public abstract auto ansi sealed M
+ extends [runtime]System.Object
+{
+ .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 07 00 00 00 00 00 )
+ .method public static class [runtime]System.Threading.Tasks.Task`1
+ asyncMethod() cil managed
+ {
+ .custom instance void [runtime]System.Runtime.CompilerServices.MethodImplAttribute::.ctor(valuetype [runtime]System.Runtime.CompilerServices.MethodImplOptions) = ( 01 00 00 20 00 00 00 00 )
+
+ .maxstack 8
+ IL_0000: ldc.i4.s 42
+ IL_0002: call class [runtime]System.Threading.Tasks.Task`1 [runtime]System.Threading.Tasks.Task`1::FromResult(!0)
+ IL_0007: ret
+ }
+
+}
+
+.class private abstract auto ansi sealed ''.$M
+ extends [runtime]System.Object
+{
+ .method public static void main@() cil managed
+ {
+ .entrypoint
+
+ .maxstack 8
+ IL_0000: ret
+ }
+
+}
+
+
diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/MethodImplAttribute/MethodImplAttribute.AsyncWithTask.fs.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/MethodImplAttribute/MethodImplAttribute.AsyncWithTask.fs.il.bsl
new file mode 100644
index 00000000000..35360c514c4
--- /dev/null
+++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/MethodImplAttribute/MethodImplAttribute.AsyncWithTask.fs.il.bsl
@@ -0,0 +1,96 @@
+.assembly extern runtime { }
+.assembly extern FSharp.Core { }
+.assembly assembly
+{
+ .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32,
+ int32,
+ int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 )
+
+
+
+
+ .hash algorithm 0x00008004
+ .ver 0:0:0:0
+}
+.mresource public FSharpSignatureData.assembly
+{
+
+
+}
+.mresource public FSharpOptimizationData.assembly
+{
+
+
+}
+.module assembly.exe
+
+.imagebase {value}
+.file alignment 0x00000200
+.stackreserve 0x00100000
+.subsystem 0x0003
+.corflags 0x00000001
+
+
+
+
+
+.class public auto ansi beforefieldinit AsyncTaskTest.TestClass
+ extends [runtime]System.Object
+{
+ .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 03 00 00 00 00 00 )
+ .method public hidebysig instance class [runtime]System.Threading.Tasks.Task`1
+ AsyncInstanceMethod() cil managed
+ {
+ .custom instance void [runtime]System.Runtime.CompilerServices.MethodImplAttribute::.ctor(valuetype [runtime]System.Runtime.CompilerServices.MethodImplOptions) = ( 01 00 00 20 00 00 00 00 )
+
+ .maxstack 8
+ IL_0000: ldstr "hello"
+ IL_0005: call class [runtime]System.Threading.Tasks.Task`1 [runtime]System.Threading.Tasks.Task`1::FromResult(!0)
+ IL_000a: ret
+ }
+
+ .method public static class [runtime]System.Threading.Tasks.Task`1
+ AsyncStaticMethod() cil managed
+ {
+ .custom instance void [runtime]System.Runtime.CompilerServices.MethodImplAttribute::.ctor(valuetype [runtime]System.Runtime.CompilerServices.MethodImplOptions) = ( 01 00 00 20 00 00 00 00 )
+
+ .maxstack 8
+ IL_0000: ldc.i4.s 100
+ IL_0002: call class [runtime]System.Threading.Tasks.Task`1 [runtime]System.Threading.Tasks.Task`1::FromResult(!0)
+ IL_0007: ret
+ }
+
+ .method public hidebysig specialname rtspecialname
+ instance void .ctor() cil managed
+ {
+
+ .maxstack 8
+ IL_0000: ldarg.0
+ IL_0001: callvirt instance void [runtime]System.Object::.ctor()
+ IL_0006: ldarg.0
+ IL_0007: pop
+ IL_0008: ret
+ }
+
+}
+
+.class public abstract auto ansi sealed AsyncTaskTest
+ extends [runtime]System.Object
+{
+ .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 07 00 00 00 00 00 )
+}
+
+.class private abstract auto ansi sealed ''.$AsyncTaskTest
+ extends [runtime]System.Object
+{
+ .method public static void main@() cil managed
+ {
+ .entrypoint
+
+ .maxstack 8
+ IL_0000: ret
+ }
+
+}
+
+
From 2dd61b56b726c876021c3db5b553bfa18f663469 Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Fri, 5 Dec 2025 15:54:01 +0000
Subject: [PATCH 8/9] Fix IL baselines to show 'async' keyword in method
signatures
Co-authored-by: TheAngryByrd <1490044+TheAngryByrd@users.noreply.github.com>
---
.../MethodImplAttribute/MethodImplAttribute.Async.fs.il.bsl | 2 +-
.../MethodImplAttribute.AsyncWithTask.fs.il.bsl | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/MethodImplAttribute/MethodImplAttribute.Async.fs.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/MethodImplAttribute/MethodImplAttribute.Async.fs.il.bsl
index 0165d2a4e4b..e6498f2a88d 100644
--- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/MethodImplAttribute/MethodImplAttribute.Async.fs.il.bsl
+++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/MethodImplAttribute/MethodImplAttribute.Async.fs.il.bsl
@@ -39,7 +39,7 @@
{
.custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 07 00 00 00 00 00 )
.method public static class [runtime]System.Threading.Tasks.Task`1
- asyncMethod() cil managed
+ asyncMethod() cil managed async
{
.custom instance void [runtime]System.Runtime.CompilerServices.MethodImplAttribute::.ctor(valuetype [runtime]System.Runtime.CompilerServices.MethodImplOptions) = ( 01 00 00 20 00 00 00 00 )
diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/MethodImplAttribute/MethodImplAttribute.AsyncWithTask.fs.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/MethodImplAttribute/MethodImplAttribute.AsyncWithTask.fs.il.bsl
index 35360c514c4..527cb635fd6 100644
--- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/MethodImplAttribute/MethodImplAttribute.AsyncWithTask.fs.il.bsl
+++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/MethodImplAttribute/MethodImplAttribute.AsyncWithTask.fs.il.bsl
@@ -39,7 +39,7 @@
{
.custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 03 00 00 00 00 00 )
.method public hidebysig instance class [runtime]System.Threading.Tasks.Task`1
- AsyncInstanceMethod() cil managed
+ AsyncInstanceMethod() cil managed async
{
.custom instance void [runtime]System.Runtime.CompilerServices.MethodImplAttribute::.ctor(valuetype [runtime]System.Runtime.CompilerServices.MethodImplOptions) = ( 01 00 00 20 00 00 00 00 )
@@ -50,7 +50,7 @@
}
.method public static class [runtime]System.Threading.Tasks.Task`1
- AsyncStaticMethod() cil managed
+ AsyncStaticMethod() cil managed async
{
.custom instance void [runtime]System.Runtime.CompilerServices.MethodImplAttribute::.ctor(valuetype [runtime]System.Runtime.CompilerServices.MethodImplOptions) = ( 01 00 00 20 00 00 00 00 )
From da31f98f9208ec98819cae45ef27d19716daa6b2 Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Fri, 5 Dec 2025 16:03:22 +0000
Subject: [PATCH 9/9] Remove manually created baseline files - will be
auto-generated by tests
Co-authored-by: TheAngryByrd <1490044+TheAngryByrd@users.noreply.github.com>
---
.../MethodImplAttribute.Async.fs.il.bsl | 67 -------------
...ethodImplAttribute.AsyncWithTask.fs.il.bsl | 96 -------------------
2 files changed, 163 deletions(-)
delete mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/MethodImplAttribute/MethodImplAttribute.Async.fs.il.bsl
delete mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/MethodImplAttribute/MethodImplAttribute.AsyncWithTask.fs.il.bsl
diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/MethodImplAttribute/MethodImplAttribute.Async.fs.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/MethodImplAttribute/MethodImplAttribute.Async.fs.il.bsl
deleted file mode 100644
index e6498f2a88d..00000000000
--- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/MethodImplAttribute/MethodImplAttribute.Async.fs.il.bsl
+++ /dev/null
@@ -1,67 +0,0 @@
-.assembly extern runtime { }
-.assembly extern FSharp.Core { }
-.assembly assembly
-{
- .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32,
- int32,
- int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 )
-
-
-
-
- .hash algorithm 0x00008004
- .ver 0:0:0:0
-}
-.mresource public FSharpSignatureData.assembly
-{
-
-
-}
-.mresource public FSharpOptimizationData.assembly
-{
-
-
-}
-.module assembly.exe
-
-.imagebase {value}
-.file alignment 0x00000200
-.stackreserve 0x00100000
-.subsystem 0x0003
-.corflags 0x00000001
-
-
-
-
-
-.class public abstract auto ansi sealed M
- extends [runtime]System.Object
-{
- .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 07 00 00 00 00 00 )
- .method public static class [runtime]System.Threading.Tasks.Task`1
- asyncMethod() cil managed async
- {
- .custom instance void [runtime]System.Runtime.CompilerServices.MethodImplAttribute::.ctor(valuetype [runtime]System.Runtime.CompilerServices.MethodImplOptions) = ( 01 00 00 20 00 00 00 00 )
-
- .maxstack 8
- IL_0000: ldc.i4.s 42
- IL_0002: call class [runtime]System.Threading.Tasks.Task`1 [runtime]System.Threading.Tasks.Task`1::FromResult(!0)
- IL_0007: ret
- }
-
-}
-
-.class private abstract auto ansi sealed ''.$M
- extends [runtime]System.Object
-{
- .method public static void main@() cil managed
- {
- .entrypoint
-
- .maxstack 8
- IL_0000: ret
- }
-
-}
-
-
diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/MethodImplAttribute/MethodImplAttribute.AsyncWithTask.fs.il.bsl b/tests/FSharp.Compiler.ComponentTests/EmittedIL/MethodImplAttribute/MethodImplAttribute.AsyncWithTask.fs.il.bsl
deleted file mode 100644
index 527cb635fd6..00000000000
--- a/tests/FSharp.Compiler.ComponentTests/EmittedIL/MethodImplAttribute/MethodImplAttribute.AsyncWithTask.fs.il.bsl
+++ /dev/null
@@ -1,96 +0,0 @@
-.assembly extern runtime { }
-.assembly extern FSharp.Core { }
-.assembly assembly
-{
- .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32,
- int32,
- int32) = ( 01 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 )
-
-
-
-
- .hash algorithm 0x00008004
- .ver 0:0:0:0
-}
-.mresource public FSharpSignatureData.assembly
-{
-
-
-}
-.mresource public FSharpOptimizationData.assembly
-{
-
-
-}
-.module assembly.exe
-
-.imagebase {value}
-.file alignment 0x00000200
-.stackreserve 0x00100000
-.subsystem 0x0003
-.corflags 0x00000001
-
-
-
-
-
-.class public auto ansi beforefieldinit AsyncTaskTest.TestClass
- extends [runtime]System.Object
-{
- .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 03 00 00 00 00 00 )
- .method public hidebysig instance class [runtime]System.Threading.Tasks.Task`1
- AsyncInstanceMethod() cil managed async
- {
- .custom instance void [runtime]System.Runtime.CompilerServices.MethodImplAttribute::.ctor(valuetype [runtime]System.Runtime.CompilerServices.MethodImplOptions) = ( 01 00 00 20 00 00 00 00 )
-
- .maxstack 8
- IL_0000: ldstr "hello"
- IL_0005: call class [runtime]System.Threading.Tasks.Task`1 [runtime]System.Threading.Tasks.Task`1::FromResult(!0)
- IL_000a: ret
- }
-
- .method public static class [runtime]System.Threading.Tasks.Task`1
- AsyncStaticMethod() cil managed async
- {
- .custom instance void [runtime]System.Runtime.CompilerServices.MethodImplAttribute::.ctor(valuetype [runtime]System.Runtime.CompilerServices.MethodImplOptions) = ( 01 00 00 20 00 00 00 00 )
-
- .maxstack 8
- IL_0000: ldc.i4.s 100
- IL_0002: call class [runtime]System.Threading.Tasks.Task`1 [runtime]System.Threading.Tasks.Task`1::FromResult(!0)
- IL_0007: ret
- }
-
- .method public hidebysig specialname rtspecialname
- instance void .ctor() cil managed
- {
-
- .maxstack 8
- IL_0000: ldarg.0
- IL_0001: callvirt instance void [runtime]System.Object::.ctor()
- IL_0006: ldarg.0
- IL_0007: pop
- IL_0008: ret
- }
-
-}
-
-.class public abstract auto ansi sealed AsyncTaskTest
- extends [runtime]System.Object
-{
- .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 07 00 00 00 00 00 )
-}
-
-.class private abstract auto ansi sealed ''.$AsyncTaskTest
- extends [runtime]System.Object
-{
- .method public static void main@() cil managed
- {
- .entrypoint
-
- .maxstack 8
- IL_0000: ret
- }
-
-}
-
-