Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
81 commits
Select commit Hold shift + click to select a range
265213e
Add CodeGen regression test infrastructure and document first 10 issues
T-Gro Jan 23, 2026
b4ec757
Add Sprint 2 tests for CodeGen regressions (issues 11-20)
T-Gro Jan 23, 2026
d04dbf0
Sprint 3: Add 10 tests for CodeGen issues #16362-#14712
T-Gro Jan 23, 2026
18e4cba
Complete codegen regression test suite: add remaining 32 issues
T-Gro Jan 23, 2026
93111d7
Sprint 4: Improve tests for issues #14707, #14706, #14508, #14492, #1…
T-Gro Jan 23, 2026
fa259ed
Sprint 5: Add/improve tests for issues #13108, #13100, #12546, #12460…
T-Gro Jan 23, 2026
aaf040d
Add TOC and summary statistics to CODEGEN_REGRESSIONS.md
T-Gro Jan 23, 2026
07cf40c
Fix stub tests #878 and #5834 with actual reproductions
T-Gro Jan 23, 2026
0fb2ae4
Fix stub tests and add OUT_OF_SCOPE markers for feature requests
T-Gro Jan 23, 2026
46ed536
Fix #5464 and #11556 tests with IL-level documentation
T-Gro Jan 23, 2026
deff17b
Sprint 3: Fix #9176, #12366, #12137, #12139 stub tests
T-Gro Jan 23, 2026
cfae6b2
Sprint 4: Verify OUT_OF_SCOPE markers for 5 feature requests
T-Gro Jan 23, 2026
bf7f4e1
Sprint 5: Final verification complete - 100% DoD satisfied
T-Gro Jan 23, 2026
bc51c16
Fix #18319: Add box instruction for literal upcasts
T-Gro Jan 23, 2026
12910c2
Fix #18956: Decimal [<Literal>] causes InvalidProgramException in Deb…
T-Gro Jan 23, 2026
e822f3e
Fix #18140: Use constrained.callvirt for method calls on value types
T-Gro Jan 23, 2026
fdb7c14
Fix #17692: Avoid duplicate parameter names in closure constructors
T-Gro Jan 23, 2026
c89db11
Fix #18868: Update CallerFilePath delegate test
T-Gro Jan 23, 2026
d2edf7d
Fix #18815: Allow extension methods for same-named types in single mo…
T-Gro Jan 23, 2026
7923b06
Fix #16565: DefaultAugmentation(false) duplicate entry in method table
T-Gro Jan 23, 2026
1c44cdd
Uncomment [<Fact>] for 5 OUT_OF_SCOPE feature request tests
T-Gro Jan 23, 2026
3544d49
Fix #878: F# exception serialization now preserves fields
T-Gro Jan 23, 2026
32eeea0
Fix #5834: Abstract event accessors now have SpecialName flag
T-Gro Jan 23, 2026
73cc938
Fix #12384: Enable test for mutually recursive value initialization
T-Gro Jan 23, 2026
89a2939
Fix #19068: Object expressions in struct types no longer generate inv…
T-Gro Jan 27, 2026
096b3ea
Fix #18263: Enable DU Is* properties duplicate method test
T-Gro Jan 27, 2026
adc85d9
Fix #14321: DU case names matching IWSAM member names no longer cause…
T-Gro Jan 27, 2026
3d6975f
Update CONTEXT.md with Sprint 3 summary
T-Gro Jan 27, 2026
09f7c76
Fix #18135: Static abstract interface members with byref params
T-Gro Jan 27, 2026
051d041
Fix #13447: Suppress tail calls when localloc (NativePtr.stackalloc) …
T-Gro Jan 27, 2026
76c75d2
Fix #19075: Skip constrained call prefix for concrete reference types
T-Gro Jan 27, 2026
8481563
Fix #14508: nativeptr in interfaces leads to TypeLoadException
T-Gro Jan 27, 2026
848b81a
Fix #14492: TypeLoadException in Release with inline constraints
T-Gro Jan 27, 2026
4433f42
Fix #18953: Action/Func conversion captures result not expression
T-Gro Jan 27, 2026
934a2c2
Enable test for #18672: Resumable code top-level value now works
T-Gro Jan 27, 2026
651b8a8
Fix #18374: RuntimeWrappedException cannot be caught
T-Gro Jan 27, 2026
2f1c1b4
Mark #16292 (SRTP debug mutable struct) as KNOWN_LIMITATION
T-Gro Jan 27, 2026
6772e97
Fix #11132: TypeLoadException when creating delegate with voidptr par…
T-Gro Jan 27, 2026
db8ef0f
Mark #15627 async before EntryPoint as KNOWN_LIMITATION
T-Gro Jan 28, 2026
911f71a
Fix #13468: outref parameter compiled as byref
T-Gro Jan 28, 2026
0aeb6ce
Fix #13100: Enable PE header characteristic test for x64 platform
T-Gro Jan 28, 2026
6b03307
Mark #12136 as KNOWN_LIMITATION: use fixed does not unpin at end of s…
T-Gro Jan 28, 2026
1f1b6f6
Refocus codegen campaign: identify 24 doable issues, clean up .ralph …
T-Gro Jan 29, 2026
a0fa043
Enable 3 IlxGen IL tests with verification: #16362 #11556 #9348
T-Gro Jan 30, 2026
a6b4d9e
Fix #16362: Extension methods generate C#-compatible method names
T-Gro Feb 2, 2026
d119d1e
Fix #11556: Property/field initializers use dup instead of stloc pattern
T-Gro Feb 2, 2026
58b4ee6
Document root causes for Issues #12546 and #16378 in tests
T-Gro Feb 2, 2026
e3f886f
Update tests for Issues #12546 and #16378 with improved documentation
T-Gro Feb 2, 2026
e9101f9
Enable tests for issues #12416, #12139, #12137
T-Gro Feb 3, 2026
0d9038b
Update IlxGen.fs
T-Gro Feb 3, 2026
92dc7a2
Disable 9 tests for unfixed issues to establish passing baseline
T-Gro Feb 4, 2026
dfddbbc
Deduplicate isLambdaBinding and reorderBindingsLambdasFirst in IlxGen.fs
T-Gro Feb 5, 2026
cdb56e1
Delete TryRecognizeCtorWithFieldSets optimization (Task 1)
T-Gro Feb 5, 2026
7424ecb
Final validation: format EraseClosures.fs, update BACKLOG.md with spr…
T-Gro Feb 5, 2026
14ee70d
Add REFACTORING.md and update BACKLOG.md with corrected DoD (66 tests…
T-Gro Feb 5, 2026
ff109af
Fix: Remove buggy attribute rotation code that broke Option.Value com…
T-Gro Feb 5, 2026
76989bd
Update REFACTORING.md with Sprint 5 verification findings
T-Gro Feb 5, 2026
447f62a
Sprint 5: Revert broken Issue #19075 fix, disable failing tests, upda…
T-Gro Feb 5, 2026
1842fac
Sprint 5: Update test baselines for Issue #18374 and #18815 changes
T-Gro Feb 5, 2026
beeb38b
Revert extension method separator to dot (.) for FsCheck binary compa…
T-Gro Feb 5, 2026
bea0df6
Re-enable Issue_16362_ExtensionMethodCompiledName test
T-Gro Feb 6, 2026
7d78aab
Fixup: Improve extension method test quality
T-Gro Feb 6, 2026
f1e580e
Fixup: Improve extension method test coverage
T-Gro Feb 6, 2026
a54a064
Fixup: Add negative assertions for extension method naming
T-Gro Feb 6, 2026
e51644e
Fixup: Improve test code quality using standard verifyIL/verifyILNotP…
T-Gro Feb 6, 2026
e1fab28
Fix IlxGen: tail call ordering, NoHelpers discard guards, revert GenC…
T-Gro Feb 7, 2026
d524a74
Fixup: Extract helpers, strengthen tests, fix misleading comments
T-Gro Feb 8, 2026
6ebf224
Cleanup: Remove tracking files and redundant comments
T-Gro Feb 8, 2026
3de0096
Fixup: Use struct tuple in fixFuncTypeArgs, apply getActualIL helper …
T-Gro Feb 8, 2026
4694872
Cleanup: Remove redundant comments across changed files
T-Gro Feb 8, 2026
8c972b7
Fixup: Deduplicate GenConstant type mapping, merge DU discard branche…
T-Gro Feb 8, 2026
64ad951
Cleanup: Remove redundant comments that restate code or test names
T-Gro Feb 8, 2026
e47a65e
Cleanup: Revert unrelated release-notes/version changes, remove redun…
T-Gro Feb 8, 2026
a6f1d21
Strengthen test coverage for three codegen regression tests
T-Gro Feb 8, 2026
37d1b07
Extract capturedTypeForFreeVar helper for byref free variable handling
T-Gro Feb 8, 2026
9b60c95
Restore missing doc comment on GenGetFreeVarForClosure (#19068)
T-Gro Feb 8, 2026
422f35c
Add release notes for 20 codegen bug fixes and clean up redundant com…
T-Gro Feb 9, 2026
d7ab586
cleanup
T-Gro Feb 10, 2026
47764c2
Merge branch 'main' into codegen-bugs
T-Gro Feb 11, 2026
3f1681e
Merge branch 'main' into codegen-bugs
T-Gro Feb 12, 2026
6e7b5f1
Merge branch 'main' into codegen-bugs
T-Gro Feb 13, 2026
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
17 changes: 17 additions & 0 deletions docs/release-notes/.FSharp.Compiler.Service/10.0.300.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,22 @@
### Fixed

* Fix TypeLoadException when creating delegate with voidptr parameter. (Issue [#11132](https://github.com/dotnet/fsharp/issues/11132))
* Suppress tail calls when localloc (NativePtr.stackalloc) is used. (Issue [#13447](https://github.com/dotnet/fsharp/issues/13447))
* Fix outref parameter compiled as byref. (Issue [#13468](https://github.com/dotnet/fsharp/issues/13468))
* Fix DU case names matching IWSAM member names no longer cause duplicate property entries. (Issue [#14321](https://github.com/dotnet/fsharp/issues/14321))
* Fix TypeLoadException in Release builds with inline constraints. (Issue [#14492](https://github.com/dotnet/fsharp/issues/14492))
* Fix nativeptr in interfaces leads to TypeLoadException. (Issue [#14508](https://github.com/dotnet/fsharp/issues/14508))
* Fix DefaultAugmentation(false) duplicate entry in method table. (Issue [#16565](https://github.com/dotnet/fsharp/issues/16565))
* Avoid duplicate parameter names in closure constructors. (Issue [#17692](https://github.com/dotnet/fsharp/issues/17692))
* Fix static abstract interface members with byref params. (Issue [#18135](https://github.com/dotnet/fsharp/issues/18135))
* Use constrained.callvirt for method calls on value types. (Issue [#18140](https://github.com/dotnet/fsharp/issues/18140))
* Fix box instruction for literal upcasts. (Issue [#18319](https://github.com/dotnet/fsharp/issues/18319))
* Fix RuntimeWrappedException cannot be caught. (Issue [#18374](https://github.com/dotnet/fsharp/issues/18374))
* Fix Action/Func conversion captures result not expression. (Issue [#18953](https://github.com/dotnet/fsharp/issues/18953))
* Fix Decimal Literal causes InvalidProgramException in Debug builds. (Issue [#18956](https://github.com/dotnet/fsharp/issues/18956))
* Fix object expressions in struct types no longer generate invalid IL with byref fields. (Issue [#19068](https://github.com/dotnet/fsharp/issues/19068))
* Fix abstract event accessors now have SpecialName flag. (Issue [#5834](https://github.com/dotnet/fsharp/issues/5834))
* Fix F# exception serialization now preserves fields. (Issue [#878](https://github.com/dotnet/fsharp/issues/878))
* Fixed Find All References not correctly finding active pattern cases in signature files. ([Issue #19173](https://github.com/dotnet/fsharp/issues/19173), [Issue #14969](https://github.com/dotnet/fsharp/issues/14969), [PR #19252](https://github.com/dotnet/fsharp/pull/19252))
* Fixed Rename not correctly handling operators containing `.` (e.g., `-.-`). ([Issue #17221](https://github.com/dotnet/fsharp/issues/17221), [Issue #14057](https://github.com/dotnet/fsharp/issues/14057), [PR #19252](https://github.com/dotnet/fsharp/pull/19252))
* Fixed Find All References not correctly applying `#line` directive remapping. ([Issue #9928](https://github.com/dotnet/fsharp/issues/9928), [PR #19252](https://github.com/dotnet/fsharp/pull/19252))
Expand Down
9 changes: 9 additions & 0 deletions src/Compiler/AbstractIL/il.fs
Original file line number Diff line number Diff line change
Expand Up @@ -3333,6 +3333,15 @@ let mkILSimpleTypar nm =
MetadataIndex = NoMetadataIdx
}

let stripILGenericParamConstraints (gp: ILGenericParameterDef) =
{ gp with
Constraints = []
HasReferenceTypeConstraint = false
HasNotNullableValueTypeConstraint = false
HasDefaultConstructorConstraint = false
HasAllowsRefStruct = false
}

let genericParamOfGenericActual (_ga: ILType) = mkILSimpleTypar "T"

let mkILFormalTypars (x: ILGenericArgsList) = List.map genericParamOfGenericActual x
Expand Down
1 change: 1 addition & 0 deletions src/Compiler/AbstractIL/il.fsi
Original file line number Diff line number Diff line change
Expand Up @@ -2066,6 +2066,7 @@ val internal mkILFormalNamedTy: ILBoxity -> ILTypeRef -> ILGenericParameterDef l
val internal mkILFormalTypars: ILType list -> ILGenericParameterDefs
val internal mkILFormalGenericArgs: int -> ILGenericParameterDefs -> ILGenericArgsList
val internal mkILSimpleTypar: string -> ILGenericParameterDef
val internal stripILGenericParamConstraints: ILGenericParameterDef -> ILGenericParameterDef

/// Make custom attributes.
val internal mkILCustomAttribMethRef:
Expand Down
16 changes: 12 additions & 4 deletions src/Compiler/AbstractIL/ilwrite.fs
Original file line number Diff line number Diff line change
Expand Up @@ -446,16 +446,24 @@ type MethodDefKey(ilg:ILGlobals, tidx: int, garity: int, nm: string, retTy: ILTy
override _.Equals(obj: obj) =
match obj with
| :? MethodDefKey as y ->
let compareILTypes o1 o2 =
let rec compareILTypes o1 o2 =
match o1, o2 with
| ILType.Value v1, ILType.Value v2 -> v1.EqualsWithPrimaryScopeRef(ilg.primaryAssemblyScopeRef, v2 :> obj )
| ILType.Value v1, ILType.Value v2 -> v1.EqualsWithPrimaryScopeRef(ilg.primaryAssemblyScopeRef, v2 :> obj)
| ILType.Boxed v1, ILType.Boxed v2 -> v1.EqualsWithPrimaryScopeRef(ilg.primaryAssemblyScopeRef, v2 :> obj)
| ILType.Byref t1, ILType.Byref t2 -> compareILTypes t1 t2
| ILType.Ptr t1, ILType.Ptr t2 -> compareILTypes t1 t2
| ILType.Array(sh1, t1), ILType.Array(sh2, t2) -> sh1 = sh2 && compareILTypes t1 t2
| ILType.Modified(req1, tref1, t1), ILType.Modified(req2, tref2, t2) ->
req1 = req2 && tref1.EqualsWithPrimaryScopeRef(ilg.primaryAssemblyScopeRef, tref2 :> obj) && compareILTypes t1 t2
| ILType.Modified(_, _, t1), t2 -> compareILTypes t1 t2
| t1, ILType.Modified(_, _, t2) -> compareILTypes t1 t2
| _ -> o1 = o2

tidx = y.TypeIdx &&
garity = y.GenericArity &&
nm = y.Name &&
// note: these next two use structural equality on AbstractIL ILType values
retTy = y.ReturnType && List.lengthsEqAndForall2 compareILTypes argTys y.ArgTypes &&
// note: these next two use scope-aware equality on AbstractIL ILType values
compareILTypes retTy y.ReturnType && List.lengthsEqAndForall2 compareILTypes argTys y.ArgTypes &&
isStatic = y.IsStatic
| _ -> false

Expand Down
27 changes: 22 additions & 5 deletions src/Compiler/Checking/MethodCalls.fs
Original file line number Diff line number Diff line change
Expand Up @@ -1305,7 +1305,16 @@ let BuildObjCtorCall (g: TcGlobals) m =
/// Implements the elaborated form of adhoc conversions from functions to delegates at member callsites
let BuildNewDelegateExpr (eventInfoOpt: EventInfo option, g, amap, delegateTy, delInvokeMeth: MethInfo, delArgTys, delFuncExpr, delFuncTy, m) =
let slotsig = delInvokeMeth.GetSlotSig(amap, m)
let delArgVals, expr =

let needsBinding =
match delFuncExpr with
| Expr.Val _
| Expr.Lambda _
| Expr.TyLambda _
| Expr.App(Expr.Val _, _, _, [], _) -> false
| _ -> true

let delArgVals, expr, wrapperOpt =
let valReprInfo = ValReprInfo([], List.replicate (max 1 (List.length delArgTys)) ValReprInfo.unnamedTopArg, ValReprInfo.unnamedRetVal)

// Try to pull apart an explicit lambda and use it directly
Expand All @@ -1322,6 +1331,13 @@ let BuildNewDelegateExpr (eventInfoOpt: EventInfo option, g, amap, delegateTy, d
if List.exists (isByrefTy g) delArgTys then
error(Error(FSComp.SR.tcFunctionRequiresExplicitLambda(delArgTys.Length), m))

let funcExprToUse, funcTyToUse, wrapper =
if needsBinding then
let v, ve = mkCompGenLocal m "delegateFunc" delFuncTy
ve, delFuncTy, Some (fun body -> mkCompGenLet m v delFuncExpr body)
else
delFuncExpr, delFuncTy, None

let delFuncArgNamesIfFeatureEnabled =
match delFuncExpr with
| Expr.Val (valRef = vref) when g.langVersion.SupportsFeature LanguageFeature.ImprovedImpliedArgumentNames ->
Expand Down Expand Up @@ -1350,15 +1366,16 @@ let BuildNewDelegateExpr (eventInfoOpt: EventInfo option, g, amap, delegateTy, d
| h :: t -> [exprForVal m h; mkRefTupledVars g m t]
| None ->
if isNil delArgTys then [mkUnit g m] else List.map (exprForVal m) delArgVals
mkApps g ((delFuncExpr, delFuncTy), [], args, m)
delArgVals, expr
mkApps g ((funcExprToUse, funcTyToUse), [], args, m)
delArgVals, expr, wrapper

| Some _ ->
let _, _, _, vsl, body, _ = IteratedAdjustLambdaToMatchValReprInfo g amap valReprInfo delFuncExpr
List.concat vsl, body
List.concat vsl, body, None

let meth = TObjExprMethod(slotsig, [], [], [delArgVals], expr, m)
mkObjExpr(delegateTy, None, BuildObjCtorCall g m, [meth], [], m)
let delegateExpr = mkObjExpr(delegateTy, None, BuildObjCtorCall g m, [meth], [], m)
(wrapperOpt |> Option.defaultValue id) delegateExpr

let CoerceFromFSharpFuncToDelegate g amap infoReader ad callerArgTy m callerArgExpr delegateTy =
let (SigOfFunctionForDelegate(delInvokeMeth, delArgTys, _, _)) = GetSigOfFunctionForDelegate infoReader delegateTy m ad
Expand Down
55 changes: 49 additions & 6 deletions src/Compiler/CodeGen/EraseClosures.fs
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,19 @@ let newIlxPubCloEnv (ilg, addMethodGeneratedAttrs, addFieldGeneratedAttrs, addFi

let mkILTyFuncTy cenv = cenv.mkILTyFuncTy

let inline private (|IsVoidPtr|_|) ty =
match ty with
| ILType.Ptr ILType.Void -> true
| _ -> false

let private fixVoidPtrForGenericArg (ilg: ILGlobals) ty =
match ty with
| IsVoidPtr -> ilg.typ_IntPtr
| _ -> ty

let mkILFuncTy cenv dty rty =
let dty = fixVoidPtrForGenericArg cenv.ilg dty
let rty = fixVoidPtrForGenericArg cenv.ilg rty
mkILBoxedTy cenv.tref_Func[0] [ dty; rty ]

let mkILCurriedFuncTy cenv dtys rty =
Expand All @@ -167,6 +179,8 @@ let typ_Func cenv (dtys: ILType list) rty =
else
mkFuncTypeRef cenv.ilg.fsharpCoreAssemblyScopeRef n

let dtys = dtys |> List.map (fixVoidPtrForGenericArg cenv.ilg)
let rty = fixVoidPtrForGenericArg cenv.ilg rty
mkILBoxedTy tref (dtys @ [ rty ])

let rec mkTyOfApps cenv apps =
Expand All @@ -189,6 +203,8 @@ let mkMethSpecForMultiApp cenv (argTys: ILType list, retTy) =
let n = argTys.Length
let formalArgTys = List.mapi (fun i _ -> ILType.TypeVar(uint16 i)) argTys
let formalRetTy = ILType.TypeVar(uint16 n)
let argTys = argTys |> List.map (fixVoidPtrForGenericArg cenv.ilg)
let retTy = fixVoidPtrForGenericArg cenv.ilg retTy
let inst = argTys @ [ retTy ]

if n = 1 then
Expand Down Expand Up @@ -392,6 +408,19 @@ let mkILFreeVarForParam (p: ILParameter) =

let mkILLocalForFreeVar (p: IlxClosureFreeVar) = mkILLocal p.fvType None

let mkUniqueFreeVarName (baseName: string) (existingFields: IlxClosureFreeVar[]) =
let existingNames = existingFields |> Array.map (fun fv -> fv.fvName) |> Set.ofArray

let rec findUnique n =
let candidate = if n = 0 then baseName else baseName + string n

if Set.contains candidate existingNames then
findUnique (n + 1)
else
candidate

findUnique 0

let mkILCloFldSpecs _cenv flds =
flds |> Array.map (fun fv -> (fv.fvName, fv.fvType)) |> Array.toList

Expand Down Expand Up @@ -490,7 +519,8 @@ let rec convIlxClosureDef cenv encl (td: ILTypeDef) clo =
let laterGenericParams = td.GenericParams @ addedGenParams

let selfFreeVar =
mkILFreeVar (CompilerGeneratedName("self" + string nowFields.Length), true, nowCloSpec.ILType)
let baseName = CompilerGeneratedName("self" + string nowFields.Length)
mkILFreeVar (mkUniqueFreeVarName baseName nowFields, true, nowCloSpec.ILType)

let laterFields = Array.append nowFields [| selfFreeVar |]
let laterCloRef = IlxClosureRef(laterTypeRef, laterStruct, laterFields)
Expand Down Expand Up @@ -545,12 +575,14 @@ let rec convIlxClosureDef cenv encl (td: ILTypeDef) clo =

let convil = convILMethodBody (Some nowCloSpec, boxReturnTy) clo.cloCode.Value

let specializeGenParams = addedGenParams |> List.map stripILGenericParamConstraints

let nowApplyMethDef =
mkILGenericVirtualMethod (
"Specialize",
ILCallingConv.Instance,
ILMemberAccess.Public,
addedGenParams (* method is generic over added ILGenericParameterDefs *) ,
specializeGenParams,
[],
mkILReturn cenv.ilg.typ_Object,
MethodBody.IL(notlazy convil)
Expand Down Expand Up @@ -612,7 +644,8 @@ let rec convIlxClosureDef cenv encl (td: ILTypeDef) clo =
let laterGenericParams = td.GenericParams
// Number each argument left-to-right, adding one to account for the "this" pointer
let selfFreeVar =
mkILFreeVar (CompilerGeneratedName "self", true, nowCloSpec.ILType)
let baseName = CompilerGeneratedName "self"
mkILFreeVar (mkUniqueFreeVarName baseName nowFields, true, nowCloSpec.ILType)

let argToFreeVarMap =
(0, selfFreeVar)
Expand Down Expand Up @@ -676,7 +709,17 @@ let rec convIlxClosureDef cenv encl (td: ILTypeDef) clo =
else
// CASE 2b - Build an Invoke method

let nowEnvParentClass = typ_Func cenv (typesOfILParams nowParams) nowReturnTy
let fixedNowParams =
nowParams
|> List.map (fun (p: ILParameter) ->
match p.Type with
| IsVoidPtr -> { p with Type = cenv.ilg.typ_IntPtr }
| _ -> p)

let fixedNowReturnTy = fixVoidPtrForGenericArg cenv.ilg nowReturnTy

let nowEnvParentClass =
typ_Func cenv (typesOfILParams fixedNowParams) fixedNowReturnTy

let cloTypeDef =
let convil = convILMethodBody (Some nowCloSpec, None) clo.cloCode.Value
Expand All @@ -685,8 +728,8 @@ let rec convIlxClosureDef cenv encl (td: ILTypeDef) clo =
mkILNonGenericVirtualInstanceMethod (
"Invoke",
ILMemberAccess.Public,
nowParams,
mkILReturn nowReturnTy,
fixedNowParams,
mkILReturn fixedNowReturnTy,
MethodBody.IL(notlazy convil)
)

Expand Down
Loading
Loading