diff --git a/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/CustomAttributes/AttributeUsage/AttributeUsage.fs b/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/CustomAttributes/AttributeUsage/AttributeUsage.fs index f6d8a0cc530..9b7cdc5a053 100644 --- a/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/CustomAttributes/AttributeUsage/AttributeUsage.fs +++ b/tests/FSharp.Compiler.ComponentTests/Conformance/BasicGrammarElements/CustomAttributes/AttributeUsage/AttributeUsage.fs @@ -933,3 +933,36 @@ and [] |> verifyCompile |> shouldSucceed #endif + + [] // Regression for https://github.com/dotnet/fsharp/issues/14304 + let ``Construct an object with default and params parameters using parameterless constructor`` () = + Fsx """ +open System +open System.Runtime.InteropServices + +type DefaultAndParams([]x: int, [] value: string[]) = + inherit Attribute() + +type ParamsOnly([] value: string[]) = + inherit Attribute() + +type DefaultOnly([]x: int) = + inherit Attribute() + +[] +type Q1 = struct end + +[] // ok +type Q11 = struct end + +[] // ok +type Q12 = struct end + +[] +type Q2 = struct end + +[] +type Q3 = struct end + """ + |> typecheck + |> shouldSucceed \ No newline at end of file