FSharp.Compiler.Service
43.12.201 - 2026-03-12
Fixed
- Fixed SRTP resolution regression causing FS0030 value restriction errors with FSharpPlus curryN-style patterns in .NET 9 SDK. (PR #19218)
- Fix FS3261 nullness warning when implementing INotifyPropertyChanged or ICommand CLIEvent properties. (Issue #18361, Issue #18349, PR #19221)
- Type relations cache: optimize key generation (Issue #19116) (PR #19120)
- Fixed QuickParse to correctly handle optional parameter syntax with
?prefix, resolving syntax highlighting issues. (Issue #11008753) (PR #19162) - Fix
--preferreduilangswitch leaking intofsi.CommandLineArgswhen positioned after script file (PR #19151) - Optimize empty string pattern matching to use null-safe .Length check instead of string equality comparison for better performance. (PR #19189)
- Fixed runtime crash when using interfaces with unimplemented static abstract members as constrained type arguments. (Issue #19184, PR #19185)
- Fix delegates with
[<OptionalArgument>]and caller info attributes failing to compile. (Issue #18868, PR #19069) - Type checker: mark generated event tree nodes as synthetic (PR #19213)
- Nullness: Fix nullness refinement in match expressions to correctly narrow type to non-null after matching null case. (Issue #18488, PR #18852)
- Scripts: Fix resolving the dotnet host path when an SDK directory is specified. (PR #18960)
- Fix excessive StackGuard thread jumping (PR #18971)
- Adjust conservative method-overload duplicate detection rules for nativeptr types (PR #18911)
- Checking: Fix checking nested fields for records and anonymous (PR #18964)
- Fix name is bound multiple times is not reported in 'as' pattern (PR #18984)
- Syntax Tree: fix return type info for let! / and! / use! (PR #19004)
- Fix: warn FS0049 on upper union case label. (PR #19003)
- Type relations cache: handle potentially "infinite" types (PR #19010)
- Disallow recursive structs with lifted type parameters (Issue #18993, PR #19031)
- Fix units-of-measure changes not invalidating incremental builds. (Issue #19049, PR #19050)
- Fix race in graph checking of type extensions. (PR #19062)
- Type relations cache: handle unsolved type variables (Issue #19037) (PR #19040)
- Fix insertion context for modules with multiline attributes. (Issue #18671, PR #19066)
- Fix
--typecheck-onlyfor scripts stopping after processing#load-ed script (PR #19048) - Fix object expressions in struct types generating invalid IL with byref fields causing TypeLoadException at runtime. (Issue #19068, PR #19070)
- Fix duplicate .cctor issue for discriminated unions with generic statics (Issue #18767, PR #18801)
- Fix early/unconditional execution of PackageFSharpDesignTimeTools target. (Issue #18924, Issue #12320, PR #18929)
Added
- Detect and error on static extension members extending types with the same simple name but different namespaces in the same module. (PR #18821)
- FSharpDiagnostic: add default severity (#19152)
- Add warning FS3879 for XML documentation comments not positioned as first non-whitespace on line. (PR #18891)
- FsiEvaluationSession.ParseAndCheckInteraction: add keepAssemblyContents optional parameter (#19155)
- Add FSharpCodeCompletionOptions (PR #19030)
- Type checker: recover on checking binding parameter constraints (#19046)
- Debugger: provide breakpoint ranges for short lambdas (#19067)
- Add support for triple quoted ASCII byte string (#19182)
Changed
- Parallel compilation features: ref resolution, graph based checking, ILXGen and optimization enabled by default (PR #18998)
- Make graph based type checking and parallel optimizations deterministic (PR #19028)
- Centralize compiler's target framework moniker logic into a single source of truth. (PR #19251)
Breaking Changes
SynExpr.LetOrUseholdsSynLetOrUse. (PR #19090)SynExprLetOrUseTriviais nowSynLetOrUseTrivia. (PR #19090)SynMemberDefn.LetBindingshas trivia. (PR #19090)SynModuleDecl.Lethas trivia. (PR #19090)- Removed support for
.mland.mlisource files. (PR #19143) - Removed
#lightand#indentdirectives (they are now a no-op; combined withoffthey give an error). (PR #19143) - Removed
--light,--indentation-syntax,--no-indendation-syntax,--ml-keywordsand--mlcompatibilitycompiler/fsi flags. (PR #19143) - Removed parsing support for long-deprecated ML (non-light) constructs. (PR #19143)
43.12.100 - 2026-03-10
Fixed
Fix internal error FS0192 "Iterate2D" when a
[<ReflectedDefinition(true)>]parameter auto-quotes an argument that captures a not-yet-generalized use of an inferred generically-recursive function. The auto-quoted (Expr.WithValue) copy now keeps a fresh link to the recursive-value use so it receives the same inferred type arguments as the executable expression at the letrec point. (Issue #20379)Fix
StackOverflowExceptionwhen checking a longseq { ... }body. Theexpr; expr; ...spine of a sequence expression was recursed without a stack guard, and the post-inferenceCheckNoReraisewalked the resulting right-nestedSeq.append/Seq.delaytree with unguarded free-variable options, so a few hundred (Debug) to a few thousand (Release) implicit-yield elements overflowed a 1 MB thread-pool thread in the IDE.tcSequenceExprBodyAsSequenceOrStatementnow runs undercenv.stackGuardandCheckNoReraiseusesCollectLocalsWithStackGuard.Fix
StackOverflowExceptionwhen checking a longseq { ... }body. Theexpr; expr; ...spine of a sequence expression was recursed without a stack guard, and the post-inferenceCheckNoReraisewalked the resulting right-nestedSeq.append/Seq.delaytree with unguarded free-variable options, so a few hundred (Debug) to a few thousand (Release) implicit-yield elements overflowed a 1 MB thread-pool thread in the IDE.tcSequenceExprBodyAsSequenceOrStatementnow runs undercenv.stackGuardandCheckNoReraiseusesCollectLocalsWithStackGuard. (PR #20480)Fix
StackOverflowExceptionwhen checking a longseq { ... }body. (PR #20480)Fix
NativePtr.stackallocnested in a larger expression (e.g. a call argument or the right of an assignment) producing an assembly that throwsInvalidProgramExceptionat load. (Issue #8083, PR #20302)Fix internal error "Unexpected generalized type variables when compiling an active pattern" when an active pattern is used in a
letbinding whose right-hand side is a generic value, e.g.let (T) = id. Such a binding is now checked like the equivalentmatchand is not generalized. (Issue #16856, PR #20383)Fix Release-only (
--optimize+)System.InvalidProgramExceptionfromSeq.collect/yield!over a value-type (struct) collection implementingseq<'T>(e.g.ImmutableArray<_>) when materialised withList.ofSeq/Seq.toList/Seq.toArrayor a list/array comprehension. The collector lowering now boxes a struct sub-collection toseq<'T>before callingAddMany/AddManyAndClose(matching the coercion the type checker already inserts foryield!), and usesunitas the try/finally result type instead of the body type (removing a spuriousldnullstore). (Issue #20203)Fix recursive inline SRTP resolution being truncated by one currying level (e.g. FSharpPlus
memoizeN), a regression from the function-domain unification order change in PR #15181; the contravariant domain now keeps the inference variable that still carries the pending member constraint. (PR #20247)Fix exponential (2^N) compile time in pattern matching with shared guards and partial active patterns. (Issue #18425, PR #20244)
Fix incorrect Debug lowering of inline builders that compose low-level resumable state machines. (Issue #20466, PR #20469)
Fix incorrect
StructLayout(Size = 1)emission for data-less struct unions where the compiler-generated tag field makes the actual runtime size larger. (PR #19759)Fix FS0750 "This construct may only be used within computation expressions" incorrectly raised for
let!/use!/do!appearing in the right-hand side of a plainletbinding inside a computation expression. The right-hand side is now desugared as a nested computation of the same builder whose result is bound withlet!, keeping its bindings correctly scoped. (Issue #19457, PR #19868)Stop leaking a
System.Diagnostics.Metrics.MeterListenerperCachein DEBUG builds. Each cache created aCacheMetrics.CacheMetricsListener(which starts aMeterListenerregistered in the process-global metrics registry) and never disposed it, so listeners accumulated for the lifetime of the process. Because every cache hit/miss/add published to all registered listeners, the per-operation cost grew linearly with the number of leaked listeners, so repeated checks (and Debug FCS test runs) slowed down over time. The per-cacheCacheMetricsListenerand the per-instancecacheIdtag are removed;DebugDisplayand tests now read the existing name-aggregated stats populated by the singleListenToAlllistener, so no per-cache listener is created and no per-operation cost is added. (PR #19995)Fix state machine lowering dropping the side-effectful receiver of an unused unit-typed member access (e.g. inside
task { (effectful()).UnitProp }). (Issue #13099, PR #19885)--deterministicRelease builds now produce byte-identicalFSharp.Compiler.Service.dllunder--parallelcompilation+and--parallelcompilation-, so it is restored to the determinism gate (now also checked sequential-vs-parallel). Code generation runs the same deferred per-file drain in both modes, with type/member/field emit-order keys and generated names derived from the file being emitted rather than thread-scheduling order. (Issue #19928, PR #19929)Fix
[<CompiledName>]silently producing duplicate IL entries (FS0192/FS2014) when applied to a multi-value let-binding (e.g.let a, b = 1, 2); now emits FS0755 at type-check time. (Issue #6131, PR #19924)Fix FS3236 when taking the address of an untyped generalized
letbinding (e.g.let ffff = ValueNone) passed to aninrefparameter. (Issue #19608, PR #19948)Fix IntelliSense not suggesting later named arguments after the first one is autocompleted, for methods (including overloaded methods like
Task.Factory.StartNew). (Issue #19906, PR #19940)Restore packaging of an F# design-time type provider that is activated via a
ProjectReferencecarryingIsFSharpDesignTimeProvider="true". The provider assembly is again included underfsharp41when packing (includingpack --no-build);PackageFSharpDesignTimeToolsnow resolves the provider viaGetTargetPath, which works indotnet pack'sBuildProjectReferences=falsecontent build without forcing an earlyResolveReferences. (Issue #18924, PR #19979)Provided types used from multiple files no longer produce spurious FS0001 type mismatches under parallel compilation; provided-type entities are now interned so every file linking a given provided type shares one entity. (PR #19969)
TypeProviders-SDK providers now load under an unoptimized compiler; the
systemRuntimeContainsTypeclosure field the SDK reflects on (tcImports) is captured stably regardless of optimization settings. (PR #19969)Provided namespaces are now interned and appended atomically alongside provided types, completing the #19969 fix: under parallel compilation two files linking the same provided namespace no longer build disjoint subtrees that strand the provided types under them (spurious FS0001/FS0039). (Issue #20020, PR #20021)
Fixed: Inheriting from an undefined type now reports
FS0039exactly once instead of three times. Phase 1F and Phase 2A of inherit-clause type-checking now skip re-resolving a syntactic clause whose Phase 1D resolution already failed withUndefinedName, eliminating both the duplicate diagnostic and the redundant work. (Issue #16432, PR #19862)Fix several F# editor semantic-classification errors: F# delegate declarations no longer highlight the
delegate of …syntax as a method, computation-expression builders inside list/array comprehensions are classified asComputationExpression, the closing]of an open-ended slice (e.g.xs[0..]) is no longer classified asFunction/Method, andopen type Tis no longer reported as unused when its imported members (static members, static fields, or DU union cases) are used. (Issue #19905, PR #19960)Diagnostic FS0027 now emits a parameter-specific message (suggesting a
let mutable x = xshadow orbyref<_>) instead of the illegallet mutable x = expressionshadow when the assignment target is a function or method parameter. (Issue #15803, PR #19866)Recursive
inlinefunctions and members now emit a single clear error (FS3890) instead of a misleading FS1113/FS1114 optimizer cascade. (Issue #17991, PR #19803)Report
FS0037 Duplicate definition of type or moduleat type-check time when two sibling modules in amodule rec/namespace recgroup share a name, instead of letting the duplicate slip through to IL emit where it surfaced as the crypticFS2014: duplicate entry . in type index table. (Issue #6694, PR #19913)Unused
Unchecked.defaultof<'T>bindings are now eliminated under optimization at their use sites. This removes redundantinitobj/ldnull;popsequences left behind after inlining SRTP helpers that useUnchecked.defaultofas dummy arguments to drive static-member-constraint resolution. Such bindings are preserved insideinlinebodies (whose optimized form is pickled as cross-assembly optimization info and re-inlined by consumers) and whenever the erased type still references unsolved type variables, so noFS0073regression is introduced. (Issue #18128, PR #19758)Semantic classification no longer marks recursive object self-references (
as this,let recself-refs) as mutable. (Issue #5229)Fix
MethodAccessExceptionunder--realsig+when a closure (innerlet rec,task/asyncstate machine, or quotation splice) inside a member defined in an intrinsic type augmentation (type C with member ...) accesses aprivatemember ofC. The synthesized closure is now nested inside the declaring type instead of beside it in the module class. (Issue #19933, PR #19955)Preserve source range for type errors on empty-bodied computation expressions (e.g.
foo {}) in pipelines, function arguments, and type-annotated contexts, instead of reportingunknown(1,1). (Issue #19550, PR #19849)Fix multiline nested type arguments failing to parse when the closing
>aligns with the opening type name's column. (Issue #15171)Tooltip "Full name" now shows demangled companion module names (e.g.
MyType.funcinstead ofMyTypeModule.func). (Issue #17335, PR #19867)Fix spurious FS0410 accessibility error when tuple-deconstructing bindings use private types in the same module scope. (Issue #4161, PR #19947)
Fix internal error (FS0193) when calling an indexed property setter with a named argument that matches an indexer parameter. (Issue #16034, PR #19851)
Fix missing FS1182 ("unused binding") warning for unused
letfunction bindings inside class types. (Issue #13849, PR #19805)Fix internal compiler error FS1110 in
task { let! }(and other computation expressions) when a generic IL extension method whosethis-parameter is a method-level type variable is in scope (e.g.open ReactiveUI). Regression from PR #19536. (Issue #19936)Fix inner mutually-recursive
let rec ... and ...functions under--realsig+not being lifted to top-level static methods (TLR), causingFSharpFuncclosure allocations and loss oftail.opcodes — the large struct-mutual-recursion perf regression reported in Issue #17607. (PR #19882)Fix
TypeLoadException("Specialize tried to implicitly override a method with weaker type parameter constraints") and the related CLR crash with constrained inline calls by stripping constraints from closure-class typars inEraseClosures.convIlxClosureDef. (Issue #14492, Issue #19075, PR #19882)Fix FS0073 during code generation when closure generic arguments contain an unsolved type variable. (PR #20229)
Fix
FieldAccessExceptionat runtime when the optimizer relocates a read of aprotected(family) base-class field into a method outside the field's family (e.g. a trivial member inlined into module/startup code under--optimize+). Protected (family) IL field access is no longer hoisted out of its declaring family by inlining or method-splitting. (Issue #19963, PR #19964)Suppress hover/symbol resolution for wildcard
_patterns insidemember _.…bodies that incorrectly showedval _: Ttooltip. (PR #19760)Report
seq { }implicit-yield diagnostics and format specifier locations once instead of twice: the classification pass that decides whether the body is a statement or a yielded element no longer double-reports to the sink or diagnostics. (Issue #16419, PR #19791, PR #19895)Stabilize codegen order under
--parallelcompilation+so--deterministicRelease builds produce byte-identical IL across rebuilds: optimizer Val iteration, IlxGen type/method/field/event emit order, anonymous-record extra-binding drain, andFileIndexassignment now follow source position rather than thread-scheduling order. (Issue #19732, PR #19810)Reject non-function bindings for single-case and partial active pattern names with FS1209, matching the existing multi-case behavior. (PR #19763)
Fix FS0421 "The address of the variable cannot be used at this point" incorrectly raised for the discard pattern
let _ = &exprwhenlet x = &exprcompiles. (Issue #18841, PR #19811)Fix double
Disposecall when ausebinding aliases its value via anaspattern or rebinds an existinguse-bound value. (Issue #12300, PR #19858)Honor
--nowarnand--warnaserrorfor warnings emitted during command-line option parsing (Issue #19576, PR #19776)Bitwise operators (
|||,&&&,^^^) applied to enums with a non-integral underlying type (e.g.char) are now rejected at compile time with FS0001 instead of compiling and failing at runtime withNotSupportedException. Gated behind theErrorOnBitwiseOpsOnNonIntegralEnumslanguage feature (F# 11.0). (Issue #11785, PR #20322)Fix
[<return: X>]prefix attributes being silently dropped on class members, and fix false-positiveAllowMultiple=falseerrors when[<X>]and[<return: X>]are applied to the same binding. (Issue #17904, Issue #19020, PR #19738)Fix
=adjacent to an interpolated string (e.g.C(Name=$"value")) being lexed as the invalid operator=$instead of an assignment followed by an interpolated string. (Issue #16696)Extend the
=adjacent to an interpolated string fix to the verbatim (=$@"…",=@$"…") and extended multi-dollar (=$$"""…""") interpolated-string forms. (Issue #16696, PR #19984)Preserve type abbreviations (
string, user-defined aliases) in the refined type of bindings introduced after a| nullpattern in amatchexpression. (Issue #19646, PR #19745)Fix attributes on return type of unparenthesized tuple methods being silently dropped from IL. (Issue #462, PR #19714)
Fix cross-assembly calls to inline SRTP functions from libraries compiled with F# 4.7 and earlier. (Issue #20253, PR #20260)
Fix enum values losing their type when used in a custom attribute argument of type
obj(they were stored as the underlying integer instead of the enum). (Issue #995, PR #19975)Fix false-positive nullness warning (FS3261) when pattern matching narrows nullness inside seq/list/array comprehensions. (Issue #19644, PR #19743)
Fix internal error FS0073 "Undefined or unsolved type variable" in IlxGen when nested inline SRTP functions with multiple overloads leave unsolved typars in the non-witness codegen path. (Issue #19709, PR #19710)
Fix internal error FS0073 "Undefined or unsolved type variable" in IlxGen
GenGenericArgswhen a phantom typar reaches a closure's generic actuals in the emitted fallback body of a nested inline SRTP member. (PR #19602)Fix NRE when calling virtual Object methods on value types through inline SRTP functions. (Issue #8098, PR #19511)
Narrow overload-resolution error ranges to the method name only instead of covering the entire expression. (Issue #14284, PR #19505)
Fix attributes not resolved from opened namespaces in
namespace rec/module recscopes. (Issue #7931, PR #19502)Fix DU case names matching IWSAM member names no longer cause duplicate property entries. (Issue #14321, PR #19341)
Fix DefaultAugmentation(false) duplicate entry in method table. (Issue #16565, PR #19341)
Fix abstract event accessors now have SpecialName flag. (Issue #5834, PR #19341)
Fix warning 20 ("expression is implicitly ignored") pointing at the wrong range when the last expression in a sequential block (e.g. inside
for,whileloops) is non-unit. The squiggle now correctly highlights only the offending expression. (Issue #5418, PR #19504)Extend the warning 20 range fix to also walk through
let/usebindings, so the squiggle lands on the offending expression when it is the body of alet/use. (Issue #5418, PR #19896)Fix missing "No implementation was given" error when F# class inherits from a C# class with
abstract overridemembers without providing an implementation. (Issue #7776, PR #19503)Fix CLIEvent properties to be correctly recognized as events:
IsEventreturnstrueandXmlDocSigusesE:prefix instead ofP:. (Issue #10273, PR #18584)Fix extra sequence point at the end of match expressions. (Issue #12052, PR #19278)
Fix wrong sequence point range for
return/yield/return!/yield!inside computation expressions. (Issue #19248, PR #19278)Fix extra out-of-order sequence point for
useintaskcomputation expressions. (Issue #19255, PR #19278)Fix debug points failing to bind in body of
[ for x in xs -> body ]comprehensions. (Issue #13504, PR #19278)Fix outref parameter compiled as byref. (Issue #13468, PR #19340)
Fix static abstract interface members with byref params. (Issue #18135, PR #19340)
Fix codegen to produce IL passing ILVerify: specialized stelem/ldelem for primitives, callvirt→call on value types, castclass at interface join points, filter→catch inside finally handlers, witness field alignment in state machine structs. (PR #19372)
Fix object expressions in struct types no longer generate invalid IL with byref fields. (Issue #19068, PR #19339)
Avoid duplicate parameter names in closure constructors. (Issue #17692, PR #19339)
Improve let-rec codegen: reorder bindings to allocate lambda closures before non-lambda values that reference them. (PR #19339)
Fix
YieldFromFinal/ReturnFromFinalbeing incorrectly called in non-tail positions (for,use,use!,try/withhandler). (Issue #19402, PR #19403)Fixed how the source ranges of warn directives are reported (as trivia) in the parser output (by not reporting leading spaces). (Issue #19405, PR #19408)
Fix UoM value type
ToString()returning garbage values when--checknulls+is enabled, caused by double address-taking in codegen. (Issue #19435, PR #19440)Fix accessibility and type-matching for extension method lookups. (Issue #19349, PR #19536)
Fix completion inconsistently showing some obsolete members (fields and events) while hiding others (methods and properties). All obsolete members are now consistently hidden by default. (Issue #13512, PR #19506)
Explicit generic type arguments are now unified in constraint-dependency order, so a subtype constraint that references a later type parameter (e.g.
Register<'a, 'b when 'a :> I<'b>>called as<Foo, int>) no longer fails with FS0001 when the argument implements the interface at several instantiations. (Issue #20103, PR #20342)Fix O(n)
TypeStructure.GetHashCodeperformance regression causing sustained high CPU in IDE mode with generative type providers. (Issue #18925, PR #19369)Fix TypeLoadException when creating delegate with voidptr parameter. (Issue #11132, PR #19338)
Suppress tail calls when localloc (NativePtr.stackalloc) is used. (Issue #13447, PR #19338)
Fix stack overflow when graph-checking long statement sequences on platforms with large stack frames (e.g. Mono ppc64le), by flattening
SynExpr.Sequentialchains inFileContentMapping. (Issue #19988, PR #20028)Fix TypeLoadException in Release builds with inline constraints. (Issue #14492, PR #19338)
Fix nativeptr in interfaces leads to TypeLoadException. (Issue #14508, PR #19338)
Fix box instruction for literal upcasts. (Issue #18319, PR #19338)
Fix Decimal Literal causes InvalidProgramException in Debug builds. (Issue #18956, PR #19338)
Fix
AttributeUsage.AllowMultiplenot being inherited for attributes subclassed in C#. (Issue #17107, PR #19315)Fix signature generation: recursive module
dobinding leaking compiler-generated val. (Issue #13832, PR #19586)Fix signature generation: literal values in attribute arguments now preserve literal identifier name. (Issue #13810, PR #19586)
Fix signature generation: struct types with non-comparable/non-equatable fields now include
[<NoComparison>]/[<NoEquality>]. (Issue #15339, PR #19586)Fix
MemoryMappedFileViewStreamcopying from non-array-backedReadOnlyMemoryvalues by falling back to the safeStream.Writepath instead of the unsupportedPositionPointerfast path. (Issue #20263, PR #20271)Fix signature generation: backtick escaping for identifiers containing backticks. (Issue #15389, PR #19586)
Fix signature generation:
privatekeyword placement for prefix-style type abbreviations. (Issue #15560, PR #19586)Fix signature generation: missing
[<Class>]attribute for types without visible constructors. (Issue #16531, PR #19586)Fix F# exception serialization now preserves fields (gated behind
--langversion:11). (Issue #878, PR #19342, PR #19746)Fix computation expressions desugaring final-position
do!asreturn!/yield!; it now usesBindwhile explicitreturn!/yield!retain final methods. (Issue #20448, PR #20449)Fix methods being tagged as
Memberinstead ofMethodin tooltips. (Issue #10540, PR #19507)Fix Debug-mode compilation when mixing resumable and standard computation expressions. (Issue #19625, PR #19630)
IlxGen: fix missing CompilationMapping attribute for generic values (PR #19643)
Fix internal error
FS0192: encodeCustomAttrElemTypewhen using arrays of user-defined types as custom attribute arguments. Empty arrays (e.g.[<DefaultValue([||] : A[])>]) now compile successfully; non-empty arrays of unencodable types report a proper diagnostic (FS3887) instead of an internal error. (Issue #12796, PR #19472)Cleanup in IL base-call checking: skip
resolveILMethodRefWithRescopewhen the method is not declared on the immediate IL type, instead of relying on thetry/witharound afailwith.FS1201still applies when the abstract member is declared on the immediate IL base. (Issue #20264, PR #20272)Fix internal compiler error in
usebindings when a C#-styleDisposeextension method is in scope alongsideIDisposable.Dispose. (Issue #19552, PR #19568)Fix signature generation: single-case struct DU gets spurious bar causing FS0300. (Issue #19597, PR #19609)
Fix signature generation: backticked active pattern case names lose escaping. (Issue #19592, PR #19609)
Fix signature generation:
namespace globalheader dropped from generated signature. (Issue #19593, PR #19609)Fix signature generation: SRTP constraints use postfix syntax that fails conformance, now uses explicit type param declarations. (Issue #19594, PR #19609)
Fix signature generation: type params with special characters missing backtick escaping. (Issue #19595, PR #19609)
Fix internal error when using custom attribute with
[<Optional>]value type parameter and no[<DefaultParameterValue>]. (Issue #8353, PR #19484)Fix overload resolution of static member extension if one or more intrinsics candidates exist (Issue #19664, PR #19698)
Fix parallel compilation of scripts (PR #19649)
Fix parser recovery, name resolution, and code completion for unfinished enum patterns (PR #19708)
Parser: fix unexpected diagnostics in debug builds, improve error messages (PR #19730)
Fix parser error for anonymous record type aliases with postfix type operators (e.g.
{| Id: Guid |} []) when closing bracket is column-aligned with opening bracket. (Issue #17407, PR #19762)Fix internal error when resolving SRTP
get_Itemwitness forstringindexers (unknown builtin witness 'get_ItemDynamic'). (Issue #18093, PR #19757)Fix false FS1113 error on inline instance members when a class-scope self identifier (
as self) is present. (Issue #17899, PR #19761)Allow
| nullnullable annotation on a[<MeasureAnnotatedAbbreviation>]over a reference type (e.g. the FSharp.UMXtype string<[<Measure>] 'm> = stringpattern). (Issue #19657)Fix
[<Struct>] ?paramoptional parameters could not be passed using the explicit?param = exprcaller-side syntax with aValueOptionvalue. (Issue #19711, PR #19742)Fix signature conformance: overloaded member with unit parameter
M(())now matches sigmember M: unit -> unit. (Issue #19596, PR #19615)Fix
--quietnot suppressing NuGet restore output on stdout in F# Interactive (Issue #18086)Reference assembly MVIDs are now deterministic across compiler invocations. Previously,
--refout/<ProduceReferenceAssembly>true</ProduceReferenceAssembly>produced a different MVID every build because the implied signature hash used .NET's randomizedString.GetHashCode(). (Issue #19751, PR #19801)Fix recursive inline-member optimization dependencies so inline consumers in recursive groups are resolved reliably without changing static initialization order. (Issue #20085, PR #20111)
Parser: recover on unfinished if and binary expressions (PR #19724)
Parser: recover on missing 'when' conditions (PR ##20071)
Fix
SynExpr.shouldBeParenthesizedInContextto report parentheses as required aroundSynExpr.Sequentialexpressions used as record or anonymous-record field values, so the IDE "remove unnecessary parentheses" analyzer no longer breaks code like{| A = ((); B = 3) |}. (Issue #17826, PR #19850)Fix semantic classification of
IDisposableand other interface types in type-occurrence positions being incorrectly classified asDisposableTypeinstead ofInterface. (Issue #16268, PR #19809)Fix missing semantic classification on second and later type qualifiers in nested copy-and-update expressions like
{ p with Person.Info.X = 1; Person.Info.Y = 2 }. (Issue #17428, PR #19878)Parser: recover on unfinished if and binary expressions (PR #19724)
Fix QuickInfo /
GetAllUsesOfAllSymbolsInFilefor overloaded CE[<CustomOperation>]keywords to report the actually-resolved overload instead of the first-registered one. (Issue #11612, Issue #15206, PR #19865)Fix
opendeclaration insertion in.fsx/.fsscriptscripts being placed before#r/#loaddirectives, producing invalid script files. (Issue #16271, PR #19879)Warn FS3888 when a compiler-semantic attribute on a value/member or type/module is present in the
.fsbut missing from the.fsi. Such attributes were previously ignored at the consumer side. Under theErrorOnMissingSignatureAttributepreview language feature, FS3888 is an error. (Issue #19560, PR #19880)Emit debug points at a stack-empty position (PR #19877)
Fix spurious XmlDoc warnings (unknown parameter / no documentation for parameter) under
--warnon:3390when a get/set property documents the full parameter set across both accessors. (Issue #13684, PR #19884)Replace internal compiler error FS0193 with a clear FS3891 diagnostic when a type abbreviation aliases a generic attribute type (e.g.
type B = A<int>then[<B>] ...). Generic attributes remain unsupported in F#. (Issue #7877, PR #19915)Fix Go to Metadata rendering of IL literal (
const) fields - they now appear with[<Literal>]and their constant value, e.g.System.Char.MaxValueno longer shows as a plainstatic val. (Issue #11526, PR #19922)FSI multi-assembly emit (
--multiemit+) now attachesSystem.Diagnostics.DebuggableAttribute(DisableOptimizations|Default)to each submission's manifest when local optimizations are disabled (--optimize-), matching the single-emit and regular-compiler behavior so debuggers see submissions as unoptimized. (Issue #14572, PR #19921)Stop F# Interactive from mutating script arguments that follow
--. Abbreviated flags like-d,-r,-Iafter the--separator are no longer colon-joined with their next token infsi.CommandLineArgs. (Issue #10819, PR #19926)Fix Go-to-Definition for provided constructors that lack
TypeProviderDefinitionLocationAttribute. Navigation now falls back to the declaring type instead of silently failing. (Issue #5538, PR #19917)Render the declaring type for C#-style extension methods in overload-resolution error messages so the suggestion no longer falsely attributes the extension to the receiver type. (Issue #9838, PR #19925)
Fix FSI pretty printing to distinguish anonymous records (
{| ... |}) from nominal records ({ ... }). (Issue #6116, PR #19919)Fix dot-completion after indexed expressions (
a.[0].Data.,a[0].Data.,[1;2].Length.) returning unrelated global completions instead of expression-typings members. (Issue #4966, PR #19934)Quotations of
match s with "" -> _no longer leak thes <> null && s.Length = 0lowering; the empty-string optimization moved from pattern-match compilation to the optimizer so quoted expressions keepop_Equality(s, ""). (Issue #19873)Parser: recover on unfinished abstract members (PR #20070)
Fix #5795: Allow attributes defined in a
module rec/namespace recscope to be used on union cases, record fields, and generic type parameters of types in the same recursive scope. (Issue #5795, PR #19744)Import: Don't walk non-F# assemblies when labelling trait constraint sources (PR #20090)
Avoid per-instance lock object in InterruptibleLazy and DelayInitArrayMap (PR #20088)
IL: fix leaking binary view (PR #20250)
Fix dependency ordering and stack safety for recursive inline bindings. (PR #20111)
Added
- FCS: add FSharpCheckFileResults.FileSignature (PR #20478)
- Added a "most concrete" tiebreaker for overload resolution (
--langversion:preview). (RFC FS-1340, PR #19277) - Added support for
OverloadResolutionPriorityAttributein overload resolution (--langversion:preview). (RFC FS-1338, PR #19277) - Added internal synthesized-name replay infrastructure for compiler-generated names, preserving normal compilation output while enabling future hot reload name stability work.
- Added
FSharpMemberOrFunctionOrValue.IsPropertyAccessorconvenience property that returns true for compiler-generated property accessors (get_X/set_X). (Issue #18157, PR #19883) - Added warning FS3884 when a function or delegate value is used as an interpolated string argument. (PR #19289)
- Symbols: add ObsoleteDiagnosticInfo (PR #19359)
- FCS: add FSharpCheckFileResults.HasErrors (PR #19892)
- Add
#version;;directive to F# Interactive to display version and environment information. (Issue #13307, PR #19332) - Add diagnostic FS3889 when a namespace and a type have the same fully-qualified name in the same assembly, replacing the misleading FS0247 "namespace and a module" error. (Issue #17827, PR #19802)
- Debug: rework for expressions stepping (PR #19894)
- Debug: rework conditional erasure, fix stepping over literals (PR #19897)
- Record spreads (RFC FS-1151, PR #18927, PR #20206)
- Debug: fix if and match condition sequence points (PR #19932)
- Surface the synthesized all-fields constructor of F# record types to F# code under the
RecordConstructorSyntaxpreview feature, via a newMethInfo.RecdCtorcase. (PR #19974) - Under
--reflectionfree, discriminated unions, records and anonymous records now get a generatedToString(rendering each field likeOptiondoes) instead of falling back to the namespace-qualified type name. (PR #19976) - Support common types of
NotNullIfNotNullAttributeusage. If a method parameter is marked withNotNullIfNotNullAttribute, the compiler will now honor this attribute and mark the return type as non-null. (PR #19977) - Checker: recover on checking language version (PR ##19970)
- Implied argument names for function-to-delegate coercions now fall back to the delegate's
Invokeparameter names when the function has no recoverable names (e.g. a partial application likeSystem.Func<int, int>((+) 1)), instead of syntheticdelegateArg0,delegateArg1, … names. (PR #20001) - Add internal
ResetCompilerGeneratedNameStatetoCompilerGlobalStatename generators so warm-checker re-compilation can produce fresh-process-identical generated names. (PR #20017) - Add internal ECMA-335 Edit-and-Continue metadata delta writer to AbstractIL. (PR #20019)
- Add Roslyn-format EnC CustomDebugInformation codec and portable PDB method CDI emission support to AbstractIL. (PR #20018)
- Extension members (including operators) now participate in SRTP (statically-resolved type parameter) constraint resolution, so member constraints on
inlinecode can be satisfied by extension members — including operators defined on types you don't own via type extensions. Intrinsic members keep priority over extension members, and extension members solve SRTP constraints without satisfying nominal static-abstract interface (IWSAM) constraints. Also adds the[<AllowOverloadOnReturnType>]attribute for overloads that differ only by return type, and tuple type extensions (type ('T1 * 'T2) with/type struct ('T1 * 'T2) with). Requires--langversion:preview. (RFC FS-1043, fslang-suggestions#230, PR #19602) - Add internal hot reload baseline reading for recorded EnC state and synthesized-name snapshot PDB data. (PR #20026)
- Support for the
<include>XML documentation tag: at compile time, documentation is copied from an external XML file selected by an XPath query and emitted into the generated documentation file.<inheritdoc>remains unsupported. (Issue #19175, PR #19186) - Expand
<inheritdoc/>at tooling time. In IDE tooltips, completion, and signature help, documentation is inherited from base classes, interfaces, overridden members, and constructors (matched by parameter signature). The FCS Symbols API (FSharpSymbol.XmlDoc) additionally resolves explicitcreftargets, but does not expand constructor inheritance. The compiler emits the tag verbatim into generated XML documentation files, matching C#;<include>is not implemented. (Issue #19175, PR #19188) - Add symbol and type highlighting to F# diagnostics (PR #20097)
- IL: hold custom attributes in fields rather than a union case (PR #20287)
- IL: reuse the cached ILTypeRef in ILTypeInfo.FromType (PR #20255)
- Name resolution: group C#-style extension members per
openand extended type (PR #20298)
Improved
- IL: cache C# extension methods per CCU (PR #20256)
- Nullness warning FS3261 on dotted method or property access (e.g.
x.Member) now underlines the receiver expression and includes the member name and (when known) the binding name in the message. (Issue #19658, PR #19814) - Import: share assembly CCUs between projects (PR #20296)
- IL: share the pickled references (PR #20301)
- Direct delegate construction (PR ##19993)
- IL: add
ILPreNamespace, makeILPreTypeDefcreation lazy (PR #20092) - IL: share ILCallingConv instances (PR #20254)
- IL: cache the ILTypeRef of a type def (PR #20259)
- IL: use empty tables for members when possible (PR #20249)
- Make Entity's adhoc members list lazy (PR #20286)
- Constraint solver:
TryDis nowinlinewith[<InlineIfLambda>]on its always-run continuation, so the argument closures are no longer allocated at the (very hot) constraint-solver call sites;IgnoreFailedMemberConstraintResolutionisinlineso its forwarded continuation stays a literal. (PR #20367) [<OptimizeClosureIfNotInlined>]adapts opaque callbacks once instead of checking their arity on every call. Lifted recursive methods no longer trigger unrelated file initialization, which could deadlock. (PR #20422)DelayedILModuleReaderno longer boxes its cachedILModuleReaderon every read: the field is typedILModuleReader | nulland matched directly. (PR #20413)- Optimizer: passing a partial application of a non-inline module-level function to an
[<InlineIfLambda>]parameter (e.g.xs |> Option.map (f a b)) no longer allocates a per-callFSharpFuncclosure when a captured argument is non-trivial (a field read, a call). Under optimization the argument is eta-expanded to a lambda with its captured evaluations floated above the binding, so the parameter's uses beta-reduce and the closure is eliminated. Captured arguments are still evaluated exactly once, in their original left-to-right order, and the binding keeps its sequence point. Partial applications of inline/SRTP functions and curried members can still allocate closures. (PR #20487)
Changed
The
--warnaserroroption now ignores unrecognized diagnostic identifiers in warning lists while still applying recognized F# warning codes. (PR #20246)Reduce allocations when inlining a generic function by fusing the optimizer's copy and type-instantiation passes into a single tree traversal instead of cloning the body twice. (PR #20363)
Improvements in error and warning messages: new error FS3885 when
let!/use!is the final expression in a computation expression; new warning FS3886 when a list literal contains a single tuple element (likely missing;separator); improved wording for FS0003, FS0025, FS0039, FS0072, FS0247, FS0597, FS0670, FS3082, and SRTP operator-not-in-scope hints. (PR #19398)Exception field serialization (
GetObjectDataand field-restoring constructor) is now gated behindlangversion:11(LanguageFeature.ExceptionFieldSerializationSupport). With langversion ≤10, exception codegen is unchanged from pre-#19342 behavior. (PR #19746)field serialization (
GetObjectDataand field-restoring constructor) is now gated behindlangversion:11(LanguageFeature.ExceptionFieldSerializationSupport). With langversion ≤10, exception codegen is unchanged from pre-#19342 behavior. (PR #19746)Async.RunImmediaterenamed and replaced with impl ofFSharp.Core'sAsync.RunSynchronouslyImmediate, whereinExceptions are unwrapped (i.e., no egregiousAggregateExceptionwrapping). (Issue #1042, PR #19804, PR #20245)Lower string-typed interpolated strings to
System.String.Concatrather than the reflection-basedprintfengine, making them trim- and NativeAOT-compatible. This generalizes and ungates the previous all-stringString.Concatoptimization, so it now applies to every string-typed interpolation. (Language suggestion #1108, PR #19971)Stabilized several
previewlanguage features into F# 11.0 (--langversion:11.0, enabled by default with a .NET 11 SDK):MethodOverloadsCache,ErrorOnMissingSignatureAttribute,DirectDelegateConstruction,AccessProtectedBaseFieldFromClosure, andRecordSpreads.FromEndSlicingintentionally remains inpreview. (PR #20199)Interpolated string holes (e.g.
$"{x}") are now formatted with invariant culture (via thestringoperator) instead of the current thread culture. (PR #19971)Lines starting with
#:are now ignored (Language suggestion 1440, RFC FS-1337, PR #20212)[<return: X>]attributes written in front of a binding are again reported bySynBinding.attributesin the untyped syntax tree, with their original grouping and[< >]ranges. The rotation intoSynValInfo.retInfoadded by PR #19738 now happens while normalizing a binding for checking instead of in the parser, so both fixes from that PR are unchanged while tools reading the parse tree (formatters, analyzers, source generators) again see what was written. (PR #20356)Calculate Entity.PublicPath instead of storing (PR #20285)
Remove the always-on
NullableOptionalInteroplanguage feature flag and collapse its guarded code to the enabled path;--disableLanguageFeature:NullableOptionalInteropis no longer a recognized feature name. (Issue #20154, PR #20378)Remove the always-on
ErrorReportingOnStaticClasseslanguage feature flag. Static-class validation remains unchanged for all supported language versions. (Issue #20180, PR #20513)Remove trailing whitespace from source files. No functional change: whitespace inside string literals and inactive
#ifregions is preserved. (PR #20355)
Breaking Changes
Add
ExtendedLayoutAttributesupport for future .NET runtime interop.ILTypeDefLayouthas a newExtendedcase. (Issue #19190, PR #19194)FSharp.Compiler.Syntax.SynInterpolatedStringPart.FillExprnow carries aSynInterpolationFormattingvalue (separating .NET alignment/format from printf specifiers) instead of anIdent option. (PR #19971)FSharp.Compiler.Syntax.SynComponentInfonow holds the type name assynType: SynType optioninstead of the previouslongId: LongIdentfield, so tuple-type extensions such astype ('T1 * 'T2) withcan be represented. Amember LongIdentcompatibility property returns the long identifier for named types and an empty list for tuple or erroneous type names. AST consumers that pattern-matched on thelongIdfield must switch to thesynTypefield or theLongIdentmember. (PR #19602)Optimizer: don't inline named functions in debug builds (PR #19548
LexFilter: drop non-strict mode (PR #20106)
43.11.300 - 2026-05-12
Fixed
- Fix strong name signature size to align with Roslyn for public signing (Issue #17451, PR #19242)
- Nullness: Fix UoM ToString returning
string | nullfor value types. (Issue #17539, PR #19262) - Nullness: Fix pipe operator nullness warning location to point at nullable argument. (Issue #18013, PR #19262)
- Nullness: Fix false positive warning when passing non-null AllowNullLiteral constructor result. (Issue #18021, PR #19262)
- Nullness: Allow
not nullconstraint on type extensions. (Issue #18334, PR #19262) - Nullness: Simplify tuple null elimination to prevent over-inference of non-null. (Issue #19042, PR #19262)
- Fixed Find All References not correctly finding active pattern cases in signature files. (Issue #19173, Issue #14969, PR #19252)
- Fixed Rename not correctly handling operators containing
.(e.g.,-.-). (Issue #17221, Issue #14057, PR #19252) - Fixed Find All References not correctly applying
#linedirective remapping. (Issue #9928, PR #19252) - Fixed
SynPat.Orpattern variables (non-left-most) incorrectly classified as bindings instead of uses. (Issue #5546, PR #19252) - Fixed Find All References not finding discriminated union types defined inside modules. (Issue #5545, PR #19252)
- Fixed synthetic event handler values appearing in Find All References results. (Issue #4136, PR #19252)
- Fixed Find All References not finding all usages of C# extension methods. (Issue #16993, PR #19252)
- Fixed Find All References on discriminated union cases not including case tester properties (e.g.,
.IsCase). (Issue #16621, PR #19252) - Fixed Find All References on record types not including copy-and-update expressions. (Issue #15290, PR #19252)
- Fixed Find All References on constructor definitions not finding all constructor usages. (Issue #14902, PR #19252)
- Fixed Find All References producing corrupted duplicate constructor symbol references with shifted ranges, and removed duplicate attribute symbols from type definition error-reporting. (Issue #19336, PR #19358)
- Fixed semantic classification regression where copy-and-update record fields were colored as type names, and union case tester dot was colored as union case. (PR #19311)
- Fix false FS1182 (unused variable) warning for query expression variables used in where, let, join, and select clauses. (Issue #422)
- Fix FS0229 B-stream misalignment when reading metadata from assemblies compiled with LangVersion < 9.0, introduced by #17706. (PR #19260)
- Fix FS3356 false positive for instance extension members with same name on different types, introduced by #18821. (PR #19260)
- Fix graph-based type checking incorrectly resolving dependencies when the same module name is defined across multiple files in the same namespace. (PR #19280)
- F# Scripts: Fix default reference paths resolving when an SDK directory is specified. (PR #19270)
- Improve static compilation of state machines. (PR #19297)
- Fix a bug where
let!anduse!were incorrectly allowed outside computation expressions. PR #19347 - Fix TypeLoadException when creating delegate with voidptr parameter. (Issue #11132, PR #19338)
- Suppress tail calls when localloc (NativePtr.stackalloc) is used. (Issue #13447, PR #19338)
- Fix TypeLoadException in Release builds with inline constraints. (Issue #14492, PR #19338)
- Fix nativeptr in interfaces leads to TypeLoadException. (Issue #14508, PR #19338)
- Fix box instruction for literal upcasts. (Issue #18319, PR #19338)
- Fix Decimal Literal causes InvalidProgramException in Debug builds. (Issue #18956, PR #19338)
Added
FSharpType: add ImportILType (PR #19300)
Type checker: recover on argument/overload checking (PR #19314)
FSharpType: add more predefined type checks (PR #19325)
Introduced a separate
NotifyRelatedSymbolUsesink and[<Flags>] RelatedSymbolUseKindenum for related symbol lookups (union case testers, copy-and-update record types).GetUsesOfSymbolInFileandGetSemanticClassificationaccept an optionalrelatedSymbolKindsparameter to opt in. (PR #19361)Support
#exit;;as alias to#quit;;in F# Interactive. (PR #19329)FCS: capture additional types during analysis (PR #19305)
Changed
- Centralized product TFM (Target Framework Moniker) into MSBuild props file
eng/TargetFrameworks.props. Changing the target framework now only requires editing one file, and it integrates with MSBuild's--getPropertyfor scripts. - Overload resolution results are now cached, providing compile time improvements for code with repeated method calls. (Issue #18807)
- Symbols: safer qualified name getting (PR #19298)
Breaking Changes
43.10.100 - 2025-11-11
Added
- Symbols: add Mfv.ApparentEnclosingType (PR #17494)
- Add opt-in warning attribute not valid for union case with fields PR #18532)
- Add support for
when 'T : Enumlibrary-only static optimization constraint. (PR #18546) - Add support for tail calls in computation expressions (PR #18804)
- Add
--typecheck-onlyflag support for F# Interactive (FSI) scripts to type-check without execution. (Issue #18686, PR #18687) - Diagnostics: add extended data for 'No constructors' error (PR #18863)
- FSharpType.Format: support top-level prefix generic types style. (PR #18897)
- FCS: allow getting captured types (PR #18878)
Fixed
- Fix F# compiler to prevent tail call emission when pinned locals are present (PR #18893)
- Fix SignatureHash to include constant values in hash computation (Issue #18758, PR #18771)
- Fix parsing errors using anonymous records and units of measures (PR #18543)
- Fix parsing errors using anonymous records and code quotations (PR #18603)
- Better error message for attribute targets. (PR #18641)
- Fixed: Allow
return,return!,yield,yield!type annotations without parentheses (PR #18533) - Allow
let!,use!,and!type annotations without requiring parentheses ((PR #18508 and PR #18682)) - Fix find all references for F# exceptions (PR #18565)
- Shorthand lambda: fix completion for chained calls and analysis for unfinished expression (PR #18560)
- Completion: fix previous namespace considered opened PR #18609
- Fix active pattern typechecking regression. (Issue #18638, PR #18642)
- Fix nullness warnings when casting non-nullable values to
IEquatable<T>to match C# behavior. (Issue #18759, PR #18770) - Error on invalid declarations in type definitions.(Issue #10066, PR #18813)
- Fix IsByRefLikeAttribute types being incorrectly suppressed in completion lists. Types like
Span<T>andReadOnlySpan<T>now appear correctly in IntelliSense. (PR #18784) - Fix SRTP nullness constraint resolution for types imported from older assemblies. AmbivalentToNull types now use legacy F# nullness rules instead of always satisfying
'T : nullconstraints. (Issue #18390, Issue #18344, PR #18785) - Fix Show XML doc for enum fields in external metadata (Issue #17939, PR #18800)
- Fix nullable types formatting in
FSharpType.Formatand tooltips to include parentheses. (PR #18842) - TypeMismatchDiagnosticExtendedData: fix expected and actual types calculation. (PR #18851)
- Format top-level generic types using a prefix style in inherit/interface declarations and flexible type annotations. (PR #18897)
- Parser: fix range for computed binding expressions (PR #18903)
- Tests: set test source for range debug printing (PR #18879)
- Checker: fix declaring type for abbreviated types extensions (PR #18909)
- Caches: type subsumption cache key perf regression (Issue #18925 PR #18926)
- Ensure that line directives are applied to source identifiers (issue #18908, PR #18918)
- Fix expected and actual types in ErrorFromAddingTypeEquation message and extended diagnostic data. (PR #18915)
- Editor: Fix Record fields completion in update record with partial field name. (PR #18946)
Changed
- Use
errorRinstead oferrorinCheckDeclarations.fswhen possible. (PR #18645) - Parser: Capture named fields block separators. (PR #18857)
- Type checker: use inner expr range in upcast constraints errors (PR #18850)
- Import
IEnumerableasseq. (PR #18865)
Breaking Changes
- Scoped Nowarn: Add the #warnon compiler directive (Language suggestion #278, RFC FS-1146 PR, PR #18049 and PR #18637)
- Simplify creation of
FSharpDiagnostics. In a few cases, errors without ranges were assigned to the currently checked file, while in other cases they carried an empty range. The latter is now true in all cases. In a few cases, ranges at eof were corrected, while in others they were not. They are now always left uncorrected. This is a prerequisit for #18553. (PR #18610). SynExprRecordFieldnow includes arangefield (PR #18617)- Mark
Range.Zeroas obsolete in favor ofRange.range0(PR #18664) - Use
Synbindingto modeland!(PR #18805) - Redesign #line processing. The original positions (unaffected by #line directives) are now kept in the AST, and
__LINE__and__SOURCE_LINE__show the original line numbers / file names. However, all diagnostics and debug information stays the same (shows the position transformed by the #line directives). (Issue #18553, PR #18699, PR 18828, PR 18829) - Unify
let,let!,useanduse!AST representation. (PR #18825)[^1]
Migration Guidance for AST Users
Note: The unified AST introduces two new boolean fields:
isFromSource: Indicates if the binding comes from user-written code (true) or is compiler-generated (false)isBang: Distinguishes computation expression bindings (let!/use!=true) from regular bindings (let/use=false)
1. Pattern Matching Updates
Before:
match expr with
| SynExpr.LetOrUse(isRec, isUse, bindings, body, range, trivia) ->
// Handle regular let/use
| SynExpr.LetOrUseBang(spBind, isUse, isFromSource, pat, rhs, andBangs, body, range, trivia) ->
// Handle let!/use!
After:
match expr with
| SynExpr.LetOrUse(isRec, isUse, isFromSource, isBang, bindings, body, range, trivia) ->
if isBang then
// This is a let!/use! expression
match bindings with
| firstBinding :: andBangs ->
match firstBinding with
| SynBinding(headPat = pat; expr = rhs) ->
// pat and rhs extracted from first binding
// andBangs contains the and! bindings
| [] -> // error case
else
// This is a regular let/use expression
2. Construction Updates
Before:
// Creating a let! expression
SynExpr.LetOrUseBang(
bindDebugPoint,
false, // isUse
true, // isFromSource
pat,
rhsExpr,
andBangs,
bodyExpr,
range,
trivia
)
After:
// Creating a let! expression
let firstBinding = SynBinding(
accessibility = None,
kind = SynBindingKind.Normal,
isInline = false,
isMutable = false,
attributes = [],
xmlDoc = PreXmlDoc.Empty,
valData = SynInfo.emptySynValData,
headPat = pat, // Pattern moved here
returnInfo = None,
expr = rhsExpr, // RHS moved here
range = range,
debugPoint = bindDebugPoint, // Debug point moved here
trivia = bindingTrivia
)
SynExpr.LetOrUse(
false, // isRecursive
false, // isUse
true, // isFromSource
true, // isBang (indicates let!)
firstBinding :: andBangs, // All bindings in single list
bodyExpr,
range,
trivia
)
3. Common Migration Patterns
Checking for computation expressions:
// Before
match expr with
| SynExpr.LetOrUseBang _ -> true
| _ -> false
// After
match expr with
| SynExpr.LetOrUse(isBang = true) -> true
| _ -> false
Extracting pattern and expression from let!:
// Before
| SynExpr.LetOrUseBang(_, _, _, pat, rhs, _, _, _, _) ->
processBinding pat rhs
// After
| SynExpr.LetOrUse(isBang = true; bindings = binding :: _) ->
match binding with
| SynBinding(headPat = pat; expr = rhs) ->
processBinding pat rhs
| _ -> // error
Processing and! bindings:
// Before
| SynExpr.LetOrUseBang(_, _, _, firstPat, firstRhs, andBangs, _, _, _) ->
processFirst firstPat firstRhs
for andBang in andBangs do
processAndBang andBang
// After
| SynExpr.LetOrUse(isBang = true; bindings = bindings) ->
match bindings with
| first :: rest ->
processBinding first
for andBang in rest do
processAndBang andBang
| [] -> // error
[^1]: See Migration Guidance for AST Users section for detailed information on how to update your code to work with the unified AST representation.
43.9.300 - 2025-05-13
Fixed
- Fix missing TailCall warning in TOp.IntegerForLoop (PR #18399)
- Fix classification of
nameofinnameof<'T>,match … with nameof ident -> …. (Issue #10026, PR #18300) - Fix Realsig+ generates nested closures with incorrect Generic (Issue #17797, PR #17877)
- Fix optimizer internal error for records with static fields (Issue #18165, PR #18280)
- Fix nullness warning with flexible types (Issue #18056, PR #18266)
- Allow first branches of match and if expressions to return nullable results (Issue #18015, PR #18322)
- Fix internal error when missing measure attribute in an unsolved measure typar. (Issue #7491, PR #18234==
- Set
Cancellable.tokenfrom async computation (Issue #18235, PR #18238) - Fix missing nullness warning when static upcast dropped nullness (Issue #18232, PR #18261)
- Cancellable: only cancel on OCE with own token (PR #18277)
- Cancellable: set token in more places (PR #18283)
- Cancellable: fix leaking cancellation token (PR #18295)
- Fix NRE when accessing nullable fields of types within their equals/hash/compare methods (PR #18296)
- Fix nullness warning for overrides of generic code with nullable type instance (Issue #17988, PR #18337)
- Unsafe downcast from
objto genericTno longer requiresnot nullconstraint onT(Issue #18275, PR #18343) - Fix "type inference problem too complicated" for SRTP with T:null and T:struct dummy constraint(Issue #18288, PR #18345)
- Fix for missing parse diagnostics in TransparentCompiler.ParseAndCheckProject (PR #18366)
- Miscellanous parentheses analyzer fixes. (PR #18350, PR #18534)
- Fix duplicate parse error reporting for GetBackgroundCheckResultsForFileInProject (Issue #18379 PR #18380)
- Fix MethodDefNotFound when compiling code invoking delegate with option parameter (Issue #5171, PR #18385)
- Fix #r nuget ..." downloads unneeded packages (Issue #18231, PR #18393)
- Fix checking bug in unpickling PR #18430
- Reenable β-reduction and subsequent reoptimization of immediately-invoked F#-defined generic delegates. (PR #18401)
- Fixed #18433, a rare case of an internal error in xml comment processing. (PR #18436)
- Fix confusing type inference error in task expression (Issue #13789, PR #18450)
- Fix missing
nullhighlighting in tooltips (PR #18457) - Fix range of SynPat.Named doesn't include accessibility (PR #18526)
- Allow
_inuse!bindings values (lift FS1228 restriction) (PR #18487) - Make
[<CallerMemberName; Struct>]combination work(PR #18444) - Fix code completion considers types from own namespace non-imported (PR #18518)
- Code completion: fix getting qualifier expression in do statements in type decls (PR #18524)
- Fix parsing errors using anonymous records and units of measures (PR #18543)
- Fixed: #18441 FSI multi-emit unstable. (PR #18465)
- Fixed: Allow
return,return!,yield,yield!type annotations without parentheses (PR #18533)
Added
- Added missing type constraints in FCS. (PR #18241)
- The 'use' keyword can be used on IDisposable|null without nullness warnings (PR #18262)
- Add support for C#
Experimentalattribute. (PR #18253) - Nullness warnings are issued for signature<>implementation conformance (PR #18186)
- Symbols: Add FSharpAssembly.IsFSharp (PR #18290)
- Type checker: don't suppress errors while checking expressions (PR #18311)
- Type parameter constraint
nullin generic code will now automatically implynot struct(Issue #18320, PR #18323) - Add a switch to determine whether to generate a default implementation body for overridden method when completing. PR #18341
- Use a more accurate range for CE Combine methods. PR #18394
- Enable TypeSubsumptionCache for IDE use. PR #18499
Changed
- FSharpCheckFileResults.ProjectContext.ProjectOptions will not be available when using the experimental Transparent Compiler feature. (PR #18205)
- Update
Obsoleteattribute checking to account forDiagnosticIdandUrlFormatproperties. (PR #18224) - Remove
Cancellable.UsingTokenfrom tests (PR #18276) - Added nullability annotations to
.Usingbuilder method forasync,taskand compiler-internal builders (PR #18292) - Warn when
unitis passed to anobj-typed argument (PR #18330) - Warning for "useless null handling" works with piped syntax constructs now (PR #18331)
- Make indent in generated overridden member code depend on the context, not fix to 4. (PR #18341)
- Adjust caller info attribute error message range (PR #18388)
- Make attribute targets mismatch a warning and not an error (PR #18492)
Breaking Changes
- Struct unions with overlapping fields now generate mappings needed for reading via reflection (Issue #18121, PR #18274)
43.9.202 - 2025-04-08
Fixed
- Fix missing TailCall warning in Sequential in use scope (PR #17927)
- Fix false negatives for passing null to "obj" arguments. Only "obj | null" can now subsume any type (PR #17757)
- Fix internal error when calling 'AddSingleton' and other overloads only differing in generic arity (PR #17804)
- Fix extension methods support for non-reference system assemblies (PR #17799)
- Ensure
frameworkTcImportsCachemutations are threadsafe. (PR #17795) - Disallow abstract member with access modifiers in sig file. (PR #17802)
- Fix concurrency issue in
ILPreTypeDefImpl(PR #17812) - Fix nullness inference for member val and other OO scenarios (PR #17845)
- Fix internal error when analyzing incomplete inherit member (PR #17905)
- Add warning when downcasting from nullable type to non-nullable (PR #17965)
- Fix missing nullness warning in case of method resolution multiple candidates (PR #17917)
- Fix failure to use bound values in
whenclauses oftry-withinseqexpressions (PR #17990) - Fix locals allocating for the special
copyOfStructdefensive copy (PR #18025) - Fix lowering of computed array expressions when the expression consists of a simple mapping from a
uint64orunativeintarray. PR #18081 - Add missing nullable-metadata for C# consumers of records,exceptions and DU subtypes generated from F# code. PR #18079
- Reduce excess memory usage in TransparentCompiler. PR #17543
- Fix a race condition in file book keeping in the compiler service (#18008)
- Fix trimming '%' characters when lowering interpolated string to a concat call PR #18123
- Completion: fix qualified completion in sequence expressions PR #18111
- Symbols: try to use ValReprInfoForDisplay in Mfv.CurriedParameterGroups (PR #18124)
- Shim/file system: fix leaks of the shim PR #18144
Added
- Let
dotnet fsi --helpprint a link to the documentation website. (PR #18006) - Deprecate places where
seqcan be omitted. (Language suggestion #1033, PR #17772) - Support literal attribute on decimals (PR #17769)
- Added type conversions cache, only enabled for compiler runs, guarded by language version preview (PR #17668)
- Added project property ParallelCompilation which turns on graph based type checking, parallel ILXGen and parallel optimization. By default on for users of langversion=preview (PR #17948)
- Adding warning when consuming generic method returning T|null for types not supporting nullness (structs,anons,tuples) (PR #18057)
- Sink: report SynPat.ArrayOrList type (PR #18127)
- Show the default value of compiler options (PR #18054)
- Support ValueOption + Struct attribute as optional parameter for methods (Language suggestion #1136, PR #18098)
- Cancellable: add safer APIs to check the token (PR #18175)
Changed
- Make ILTypeDef interface impls calculation lazy. (PR #17392)
- Remove non-functional useSyntaxTreeCache option. (PR #17768)
- Better ranges for CE
let!anduse!error reporting. (PR #17712) - Better ranges for CE
do!error reporting. (PR #17779) - Better ranges for CE
return, yield, return! and yield!error reporting. (PR #17792) - Better ranges for CE
match!. (PR #17789) - Better ranges for CE
useerror reporting. (PR #17811) - Better ranges for
inheriterror reporting. (PR #17879) - Better ranges for
inheritstructerror reporting. (PR #17886) - Warn on uppercase identifiers in patterns. (PR #15816)
- Better ranges for
inheritobjects error reporting. (PR #17893) - Better ranges for #nowarn error reporting; bring back #nowarn warnings for --langVersion:80; add warnings under feature flag (PR #17871)
- Better ranges for #nowarn error reporting; bring back #nowarn warnings for --langVersion:80; add warnings under feature flag (PR #17871)
- CheckAndThrow can be invoked only from within Cancellable context (PR #18037)
- Make ILTypeDef base type calculation lazy. (PR #18005)
- Revert EnforceAttributeTargets Feature. (PR #18005)
Breaking Changes
- Aliasing
StructAttributewill now produce a warning (part of Language suggestion #18298, PR #18355)
43.9.201 - 2025-02-11
Fixed
- Fix Realsig+ generates nested closures with incorrect Generic (Issue #17797, PR #17877)
- Fix missing TailCall warning in Sequential in use scope (PR #17927)
- Fix false negatives for passing null to "obj" arguments. Only "obj | null" can now subsume any type (PR #17757)
- Fix internal error when calling 'AddSingleton' and other overloads only differing in generic arity (PR #17804)
- Fix extension methods support for non-reference system assemblies (PR #17799)
- Ensure
frameworkTcImportsCachemutations are threadsafe. (PR #17795) - Disallow abstract member with access modifiers in sig file. (PR #17802)
- Fix concurrency issue in
ILPreTypeDefImpl(PR #17812) - Fix nullness inference for member val and other OO scenarios (PR #17845)
- Add warning when downcasting from nullable type to non-nullable (PR #17965)
- Fix missing nullness warning in case of method resolution multiple candidates (PR #17917)
- Fix failure to use bound values in
whenclauses oftry-withinseqexpressions (PR #17990) - Fix locals allocating for the special
copyOfStructdefensive copy (PR #18025) - Fix lowering of computed array expressions when the expression consists of a simple mapping from a
uint64orunativeintarray. PR #18081 - Add missing nullable-metadata for C# consumers of records,exceptions and DU subtypes generated from F# code. PR #18079
- Reduce excess memory usage in TransparentCompiler. PR #17543
- Fix a race condition in file book keeping in the compiler service (#18008)
- Fix trimming '%' characters when lowering interpolated string to a concat call PR #18123
- Completion: fix qualified completion in sequence expressions PR #18111
- Symbols: try to use ValReprInfoForDisplay in Mfv.CurriedParameterGroups (PR #18124)
- Shim/file system: fix leaks of the shim PR #18144
- fsi: fix auto-loading of script file inside NuGet package (PR #18177)
- Fix for
Obsoleteattribute warning/error not taken into account when used with a unit of measure PR #18182
Added
- Let
dotnet fsi --helpprint a link to the documentation website. (PR #18006) - Deprecate places where
seqcan be omitted. (Language suggestion #1033, PR #17772) - Support literal attribute on decimals (PR #17769)
- Added type conversions cache, only enabled for compiler runs, guarded by language version preview (PR #17668)
- Added project property ParallelCompilation which turns on graph based type checking, parallel ILXGen and parallel optimization. By default on for users of langversion=preview (PR #17948)
- Adding warning when consuming generic method returning T|null for types not supporting nullness (structs,anons,tuples) (PR #18057)
- Sink: report SynPat.ArrayOrList type (PR #18127)
- Show the default value of compiler options (PR #18054)
- Support ValueOption + Struct attribute as optional parameter for methods (Language suggestion #1136, PR #18098)
- Cancellable: add safer APIs to check the token (PR #18175)
Changed
- Make ILTypeDef interface impls calculation lazy. (PR #17392)
- Remove non-functional useSyntaxTreeCache option. (PR #17768)
- Better ranges for CE
let!anduse!error reporting. (PR #17712) - Better ranges for CE
do!error reporting. (PR #17779) - Better ranges for CE
return, yield, return! and yield!error reporting. (PR #17792) - Better ranges for CE
match!. (PR #17789) - Better ranges for CE
useerror reporting. (PR #17811) - Better ranges for
inheriterror reporting. (PR #17879) - Better ranges for
inheritstructerror reporting. (PR #17886) - Warn on uppercase identifiers in patterns. (PR #15816)
- Better ranges for
inheritobjects error reporting. (PR #17893) - Better ranges for #nowarn error reporting; bring back #nowarn warnings for --langVersion:80; add warnings under feature flag (PR #17871)
- Better ranges for #nowarn error reporting; bring back #nowarn warnings for --langVersion:80; add warnings under feature flag (PR #17871)
- CheckAndThrow can be invoked only from within Cancellable context (PR #18037)
- Make ILTypeDef base type calculation lazy. (PR #18005)
- Removed redundant hash directives around nullness syntax (Issue #18601, PR #18203, PR #18207)
Breaking Changes
- Aliasing
StructAttributewill now produce a warning (part of Language suggestion #1136, PR #18098) - The
baseTypefield inSynMemberDefn.Inherithas now typeSynType option, to fix internal error when analyzing incomplete inherit member (PR #17905)
43.9.100 - 2024-11-12
Fixed
- Fix wrong TailCall warning (Issue #17604, PR #17637)
- Compiler hangs when compiling inline recursive invocation (Issue #17376, PR #17394)
- Fix reporting IsFromComputationExpression only for CE builder type constructors and let bindings. (PR #17375)
- Optimize simple mappings in comprehensions when the body of the mapping has
let-bindings and/or sequential expressions before a single yield. (PR #17419) - C# protected property can be assigned in F# inherit constructor call. (Issue #13299, PR #17391)
- MethodAccessException on equality comparison of a record with private fields. (Issue #17447, PR #17391)
- Fix
functionimplicit conversion. (Issue #7401, PR #17487) - Compiler fails to recognise namespace in FQN with enabled GraphBasedChecking. (Issue #17508, PR #17510)
- Fix missing message for type error (FS0001). (Issue #17373, PR #17516)
- Nullness export - make sure option<> and other UseNullAsTrueValue types are properly annotated as nullable for C# and reflection consumers PR #17528
- MethodAccessException on equality comparison of a type private to module. (Issue #17541, PR #17548)
- Fixed checking failure when
globalnamespace is involved with enabled GraphBasedChecking (PR #17553) - Add missing byte chars notations, enforce limits in decimal notation in byte char & string (Issues #15867, #15868, #15869, PR #15898)
- Parentheses analysis: keep extra parentheses around unit & tuples in method definitions. (PR #17618)
- Fix IsUnionCaseTester throwing for non-methods/properties #17301
- Fix xmlc doc tooltip display for nullable types #17741
- Consider
open typeused when the type is an enum and any of the enum cases is used unqualified. (PR #17628) - Guard for possible StackOverflowException when typechecking non recursive modules and namespaces (PR #17654)
- Nullable - fix for processing System.Nullable types with nesting (PR #17736)
- Fixes for the optimization of simple mappings in array and list comprehensions. (Issue #17708, PR #17711)
Added
- Support for nullable reference types (PR #15181)
- Treat .ToString() on F# types as returning non-nullable string in --checknulls+ context (PR #17547)
- Parser: recover on missing union case fields (PR #17452)
- Parser: recover on missing union case field types (PR #17455)
- Sink: report function domain type (PR #17470)
- Allow access modifies to auto properties getters and setters (Language suggestion #430, PR 16687, PR 16861, PR 17522)
- Render C# nullable-analysis attributes in tooltips (PR #17485)
- Allow object expression without overrides. (Language suggestion #632, PR #17387)
- Enable FSharp 9.0 Language Version (Issue #17497), PR))
- Enable LanguageFeature.EnforceAttributeTargets in F# 9.0. (Issue #17514, PR #17516)
- Parser: better recovery for unfinished patterns (PR #17231, PR #17232))
- Enable consuming generic arguments defined as
allows ref structin C# (Issue #17597, display them in tooltips PR #17706) - Trivia for SynTypeConstraint.WhereTyparNotSupportsNull. (Issue #17721, PR #17745)
- Trivia for SynType.WithNull. (Issue #17720, PR #17745)
Changed
- Change compiler default setting realsig+ when building assemblies (Issue #17384, PR #17378)
- Change compiler default setting for compressedMetadata (Issue #17379, PR #17383)
- Treat
{ new Foo() }asSynExpr.ObjExpr(PR #17388) - Optimize metadata reading for type members and custom attributes. (PR #17364)
- Enforce
AttributeTargetson unions. (PR #17389) - Applied nullable reference types to FSharp.Compiler.Service itself (PR #15310)
- Ensure that isinteractive multi-emit backing fields are not public. (Issue #17439), (PR #17439)
- Better error reporting for unions with duplicated fields. (PR #17521)
- Better CE error reporting when using
use!withand!(PR #17671) - Better error reporting for let bindings. (PR #17601)
- Optimize ILTypeDef interface impls reading from metadata. (PR #17382)
- Make ILTypeDef interface impls calculation lazy. (PR #17392)
- Better error reporting for active patterns. (PR #17666)
- Multiple fsi sessions use separate temporary directories (PR #17760)
Breaking Changes
43.8.400 - 2024-08-13
Fixed
- Enforce
AttributeTargetson records. (PR #17207) - Fix a false positive of the
[<TailCall>]analysis in combination with async. (Issue #17237, PR #17241) - Extended #help directive in fsi to show documentation in the REPL. (PR #17140)
- Fix internal error when dotting into delegates with multiple type parameters. (PR #17227)
- Error for partial implementation of interface with static and non-static abstract members. (Issue #17138, PR #17160)
- Optimize simple mappings with preludes in computed collections. (PR #17067)
- Improve error reporting for abstract members when used in classes. (PR #17063)
- Improve error reporting when property has same name as DU case. (Issue #16646, PR #17088)
- Make typechecking of indexed setters with tuples on the right more consistent. (Issue #16987, PR #17017)
- Static abstract method on classes no longer yields internal error. (Issue #17044, PR #17055)
- Disallow calling abstract methods directly on interfaces. (Issue #14012, Issue #16299, PR #17021)
- Various parenthesization API fixes. (PR #16977)
- Files passed with -embed:relative/path/to/file are not embedded. (Issue #16768)
- Fix bug in optimization of for-loops over integral ranges with steps and units of measure. (Issue #17025, PR #17040, PR #17048)
- Fix calling an overridden virtual static method via the interface (PR #17013)
- Fix state machines compilation, when big decision trees are involved, by removing code split when resumable code is detected (PR #17076)
- Fix for exponential runtime in CE builders when using nested implicit yields PR #17096
- Fix several AND operator parser bugs and regressions (Issue #16447, Issue #17134, Issue #16309, PR #17113)
- Treat exceptions as types in a namespace for graph based type checking (Issue #17262, PR #17268)
- FS0243 - Unrecognized option: '--realsig-' #17561 (Issue #17561, PR #17268)
Added
- Generate new
Equalsoverload to avoid boxing for structural comparison (PR #16857) - Allow #nowarn to support the FS prefix on error codes to disable warnings (Issue #17206, PR #17209)
- Allow ParsedHashDirectives to have argument types other than strings (Issue #17240, PR #17209)
- Parser: better recovery for unfinished patterns (PR #17231)
- Expose inner exception information of TypeProviders to help diagnostics in IDE (PR #17251)
- Parser: recover on empty match clause (PR #17233)
- Support empty-bodied computation expressions. (Language suggestion #1232, RFC FS-1144 (PR #774), PR #17352)
Changed
- Enforce
AttributeTargets.Interface(PR #17173) - Minor compiler perf improvements. (PR #17130)
- Improve error messages for active pattern argument count mismatch (PR #16846, PR #17186)
- AsyncLocal diagnostics context. (PR #16779)
- Reduce allocations in compiler checking via
ValueOptionusage (PR #16822) - Use AsyncLocal instead of ThreadStatic to hold Cancellable.Token (PR #17156)
- Showing and inserting correct name of entities from unopened namespace/module (Issue #14375, PR #17261)
- Improve completion after method/property override (PR #17292)
- Support lazy custom attributes calculation for
ILTypeDefpublic API, improveExtensionAttributepresence detecting perf. (PR #16168)
43.8.300 - 2024-05-14
Fixed
- Fix a false positive of the
[<TailCall>]analysis in combination withyield!. (PR #16933) - Improve error reporting: ambiguous override method in object expression. (PR #16985)
- Don't blow the stack when traversing deeply nested sequential expressions. (PR #16882)
- Fix wrong range start of INTERP_STRING_END. (PR #16774, PR #16785)
- Fix missing warning for recursive calls in list comprehensions. (PR #16652)
- Code generated files with > 64K methods and generated symbols crash when loaded. Use inferred sequence points for debugging. (Issue #16399, #PR 16514)
nameof Moduleexpressions and patterns are processed to link files in--test:GraphBasedChecking. (PR #16550, PR #16743)- Graph Based Checking doesn't throw on invalid parsed input so it can be used for IDE scenarios (PR #16575, PR #16588, PR #16643)
- Various parenthesization API fixes. (PR #16578, PR #16666, PR #16901, PR #16973, PR #17012)
- Keep parens for problematic exprs (
if,match, etc.) in$"{(…):N0}",$"{(…),-3}", etc. (PR #16578) - Fix crash in DOTNET_SYSTEM_GLOBALIZATION_INVARIANT mode #PR 16471)
- Fix16572 - Fixed the preview feature enabling Is properties for union case did not work correctly with let .rec and .fsi files (PR #16657)
[<CliEvent>]member should not produce property symbol. (Issue #16640, PR #16658)- Fix discriminated union initialization. (#PR 16661)
- Allow calling method with both Optional and ParamArray. (#PR 16688, suggestions #1120)
- Return diagnostics that got suppressed by errors in previous files. (PR #16719)
- Fix release inline optimization, which leads to MethodAccessException if used with `assembly:InternalsVisibleTo`` attribute. (Issue #16105, (PR #16737)
- Enforce AttributeTargets on let values and functions. (PR #16692)
- Enforce AttributeTargets on union case declarations. (PR #16764)
- Disallow using base to invoke an abstract base method. (Issue #13926, PR #16773)
- Parser: more unfinished member recovery (PR #16835)
- Enforce AttributeTargets on implicit constructors. (PR #16845)
- Enforce AttributeTargets on structs and classes (PR #16790)
- Parser: fix pattern range for idents with trivia (PR #16824)
- Fix broken code completion after a record type declaration (PR #16813)
- Enforce AttributeTargets on enums (PR #16887)
- Completion: fix for unfinished record field decl (PR #16893)
- Enforce AttributeTargets on delegates (PR #16891)
- Obsolete attribute is ignored in constructor property assignment (PR #16900)
- Completion: fix completion in empty dot lambda prefix (#16829)
- Fix StackOverflow when checking non-recursive bindings in module or namespace in
fscAnyCpu/fsiAnyCpu. (PR #16908) - Removes signature file adjacency check in Transparent Compiler Issue #17082 PR #17085
Added
- The stackguard depth for ILPdbWriter.unshadowScopes can be modified via the environment variable
FSHARP_ILPdb_UnshadowScopes_StackGuardDepth(PR #16583) - Parser recovers on complex primary constructor patterns, better tree representation for primary constructor patterns. (PR #16425)
- Name resolution: keep type vars in subsequent checks (PR #16456)
- Higher-order-function-based API for working with the untyped abstract syntax tree. (PR #16462)
- PrettyNaming: make
DoesIdentifierNeedBacktickspublic (PR #16613) - Add switch to generate types and members with IL visibility that accurately represents their F# visibility. (PR #15484
- Allow returning bool instead of unit option for partial active patterns. (Language suggestion #1041, PR #16473)
- Symbols: Add GenericArguments to FSharpEntity (PR #16470)
- Parser: more 'as' pattern recovery (PR #16837)
- Add extended data for
DefinitionsInSigAndImplNotCompatibleAbbreviationsDiffer(FS0318). (PR #16811)) - Checker/patterns: recover on unresolved long identifiers (PR #16842)
- SynExprSequentialTrivia (Issue #16914, PR #16981)
Changed
- Autogenerated .Is* members for unions skipped for single-case unions. (PR 16571)
implicitCtorSynPatsinSynTypeDefnSimpleRepr.Generalis nowSynPat optioninstead ofSynSimplePats option. (PR #16425)SyntaxVisitorBase<'T>.VisitSimplePatsnow takesSynPatinstead ofSynSimplePat list. (PR #16425)- Reduce allocations in compiler checking via
ValueOptionusage (PR #16323, PR #16567) - Reverted #16348
ThreadStaticCancellationTokenchanges to improve test stability and prevent potential unwanted cancellations. (PR #16536) - Refactored parenthesization API. ([PR #16461])(https://github.com/dotnet/fsharp/pull/16461))
- Optimize some interpolated strings by lowering to string concatenation. (PR #16556)
- Speed up
for x in xs -> …in list & array comprehensions in certain scenarios. (PR #16948) - Integral range optimizations. (PR #16650, PR #16832, PR #16947)
F# 8.0.202 - Not on NuGet
Fixed
nameof Module expressions and patterns are processed to link files in --test:GraphBasedChecking. (PR #16570, PR #16747)
43.8.200 - 2024-02-13
Fixed
- Correctly handle assembly imports with public key token of 0 length. (Issue #16359, PR #16363)
- Range of SynField (PR #16357)
- Limit a type to 65K methods, introduce a compile-time error if any class has over approx 64K methods in generated IL. (Issue #16398, #PR 16427)
Added
- Raise a new error when interfaces with auto properties are implemented on constructor-less types. (PR #16352)
- Allow usage of
[<TailCall>]with olderFSharp.Corepackage versions. (PR #16373) - Parser recovers on unfinished
aspatterns. (PR #16404) - Allow type-checking of unfinished object expressions. (PR #16413)
- Parser recovers on unfinished enum case declarations. (PR #16401)
- Parser recovers on unfinished record declarations. (PR #16357)
MutableKeywordto SynFieldTrivia (PR #16357)- Added support for a new parameterless constructor for
CustomOperationAttribute, which, when applied, will use method name as keyword for custom operation in computation expression builder. (PR #16475, part of implementation for fslang-suggestions/1250) - Compiler service API for getting ranges of unnecessary parentheses. (PR #16079 et seq.)
Changed
- Speed up unused opens handling for empty results. (PR #16502)
43.8.100 - 2023-11-14
Fixed
- Include the
get,setkeywords in the range ofSynMemberDefn.AutoProperty. (PR #15835)
<summary>Performs operations on <see cref="T:System.String" /> instances that contain file or directory path information. These operations are performed in a cross-platform manner.</summary>
Path.Combine( paths: string array) : string
Path.Combine(path1: string, path2: string) : string
Path.Combine(path1: string, path2: string, path3: string) : string
Path.Combine(path1: string, path2: string, path3: string, path4: string) : string
Renders the release notes of a package: one section per notes file in `path`, ordered by
package version, newest first. Which package versions belong to a notes file is looked up
from the source commit of each package on NuGet, from `minPackageVersion` on.
Notes without a package are either the upcoming release, placed at the top as `upcomingVersion`,
or an old servicing version that never shipped, placed where `packageVersionOfNotes` puts it.
type Version = interface ICloneable interface IComparable interface IComparable<Version> interface IEquatable<Version> interface IFormattable interface ISpanFormattable interface IUtf8SpanFormattable interface IUtf8SpanParsable<Version> new: unit -> unit + 4 overloads member Clone: unit -> obj ...
<summary>Represents the version number of an assembly, operating system, or the common language runtime. This class cannot be inherited.</summary>
--------------------
System.Version() : System.Version
System.Version(version: string) : System.Version
System.Version(major: int, minor: int) : System.Version
System.Version(major: int, minor: int, build: int) : System.Version
System.Version(major: int, minor: int, build: int, revision: int) : System.Version
<summary>Gets the value of the major component of the version number for the current <see cref="T:System.Version" /> object.</summary>
<returns>The major version number.</returns>
<summary>Gets the value of the build component of the version number for the current <see cref="T:System.Version" /> object.</summary>
<returns>The build number, or -1 if the build number is undefined.</returns>
The F# version main is at, and the FCS version that goes with it
F# Compiler Guide