diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/Expressions/ObjectExpressions/ObjectExpressions.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/Expressions/ObjectExpressions/ObjectExpressions.fs index 62c1d0edc95b..22da900a325b 100644 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/Expressions/ObjectExpressions/ObjectExpressions.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/Expressions/ObjectExpressions/ObjectExpressions.fs @@ -233,6 +233,23 @@ type MyClass() = class end |> typecheck |> shouldSucceed + [] + let ``Object expression can not implement an abstract class and interface having no abstract members preview`` () = + Fsx """ +type IFirst = interface end + +[] +type MyClass() = class end + +{ new MyClass() with + member x.ToString() = "OK" + + interface IFirst } |> ignore + """ + |> withLangVersionPreview + |> typecheck + |> shouldSucceed + [] let ``Object expression can implement an abstract class having no abstract members.`` () = Fsx """