From d8e033286d7d27b0becc58a5ed05399740f4856d Mon Sep 17 00:00:00 2001 From: Edgar Gonzalez Date: Tue, 30 Jul 2024 21:32:59 +0100 Subject: [PATCH] more tests --- .../ObjectExpressions/ObjectExpressions.fs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) 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 """