Skip to content

Infinite loop on expanding cycle for struct types #6069

@TIHan

Description

@TIHan
[<Struct>]
type MyStruct<'T> =

    val field : YourStruct<MyStruct<MyStruct<'T>>>

and [<Struct>] YourStruct<'T> =

    val field : 'T

If you define this in F#, it will cause an infinite loop in the compiler and you will have to kill your process for it to stop.

We expect to receive an error when defining this type.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area-Compiler-CheckingType checking, attributes and all aspects of logic checkingBugImpact-Low(Internal MS Team use only) Describes an issue with limited impact on existing code.

    Type

    Projects

    Status

    Done

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions