Skip to content

FSharpType overrides GetHashCode causing infinite loop #518

@fsoikin

Description

@fsoikin

This line:

       override x.GetHashCode() = hash x

hash goes to Microsoft.FSharp.Core.LanguagePrimitives.HashCompare.GenericHashIntrinsic<'t>, which does a few checks and, having confirmed that FSharpType does not implement IStructuralEquatable, falls straight back to Object.GetHashCode, thus looping the sequence.

Because all these calls are tail calls, this doesn't even cause a StackOverflowException, simply hangs up forever.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions