diff --git a/src/utils/prim-lexing.fs b/src/utils/prim-lexing.fs index 1f772d6e87e..151052b5f80 100644 --- a/src/utils/prim-lexing.fs +++ b/src/utils/prim-lexing.fs @@ -52,7 +52,12 @@ type StringText(str: string) = member __.String = str override __.GetHashCode() = str.GetHashCode() - override __.Equals(obj: obj) = str.Equals(obj) + override __.Equals(obj: obj) = + match obj with + | :? StringText as other -> other.String.Equals(str) + | :? string as other -> other.Equals(str) + | _ -> false + override __.ToString() = str interface ISourceText with