Closed
Description
Under .net framework FSI, I'm getting internal error:
Repro steps
type Foo =
abstract member X : string with get, set
type FooImpl =
{ name: string }
interface Foo with
member val X = "" with get, set
Actual behavior
error FS0073: internal error: Unexpected definition (AutoProperty
([], false, X, None, PropertyGetSet, <fun:_fsyacc_reductions@2322-424>,
PreXmlDoc ((7,4), FSharp.Compiler.Xml.XmlDocCollector), None,
\test.fsx (7,17--7,18),
Const
(String
("", Regular,
\test.fsx (7,19--7,21)),
\test.fsx (7,19--7,21)),
Some
\test.fsx (7,22--7,26),
Some
\test.fsx (7,22--7,35),
\test.fsx (7,4--7,21)),
ContainerInfo
(Parent FSI_0002,
Some
(MemberOrValContainerInfo
(FooImpl,
Some
(Foo,
SlotImplSet
([RequiredSlot (FSMeth (<TcGlobals>, Foo, X, None), false);
RequiredSlot (FSMeth (<TcGlobals>, Foo, X, None), false)],
map
[("get_X",
[RequiredSlot (FSMeth (<TcGlobals>, Foo, X, None), false)]);
("set_X",
[RequiredSlot (FSMeth (<TcGlobals>, Foo, X, None), false)])],
[], [FSProp (<TcGlobals>, Foo, Some X, Some X)])), None,
NoSafeInitInfo, []))))
Expected behavior
Compiles.
Known workarounds
To not use a record.
Related information
- Windows 11
- .NET Framework 4.8 FSI
- VS 2022 17.2.6
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Done