Closed xperiandri closed 2 days ago
Extracted code from the repro.
namespace Foo
open System.Text.Json.Serialization
type internal ApplicationTenantJsonDerivedTypeAttribute() =
inherit JsonDerivedTypeAttribute (typeof<ApplicationTenant>, "a")
// --------------------------------------------------------------------------
// IMPORTANT: Read ReadMe before modifying this сlass and any referenced types
// --------------------------------------------------------------------------
and [<ApplicationTenantJsonDerivedType>] ApplicationTenant [<JsonConstructor>] (id, name, loginProvider, allowedDomains, authorizedTenants, properties) =
member _.Id = ""
At first glance I thought it could be related to the AttributeTargets
changes but I did a quick test and even disabling the checks still reproduces. So not sure as of now.
Switching to 8 fixes it, so it's one of the options, just matter of bisecting them
FS1133 No constructors are available for the type 'ApplicationTenantJsonDerivedTypeAttribute'
Repro steps
Use the attached reproduction project DerivedAttributeRepro.zip
Expected behavior
Code builds successfully
Actual behavior
Compile time error
Related information