Compiler throws internal error when using record 'with' construct on type with static let #18165
Labels
Area-Compiler-Optimization
The F# optimizer, release code gen etc.
Bug
Impact-Medium
(Internal MS Team use only) Describes an issue with moderate impact on existing code.
Milestone
When using 'with' to construct a record based on another record, in a specific set of circumstances the compiler fails with the following errors:
The following toy application reproduces the error:
Note that the following are required:
baz
must usewith
based on another record type that also useswith
based on another record type: ifbaz
is changed to= { foo with...
the code builds correctly.static let
: ifstaticLet
is removed then the code builds correctly.doThing
is removed and replaced withlet foo = { Field = "" }
then the code builds correctly.This error only happens when building with optimisations switched on.
Tested using the
9.0.101
SDK.The text was updated successfully, but these errors were encountered: