Skip to content

[Bug] The PersistableModelCreateCore method is changing the return type and it is not allowed #3741

@ArcturusZhang

Description

@ArcturusZhang

The code on main builds with this failure:

src\Generated\Models\ModelWithBaseModelWithRequired.Serialization.cs(114,59): error CS8830: 'ModelWithBaseModelWith
Required.PersistableModelCreateCore(BinaryData, ModelReaderWriterOptions)': Target runtime doesn't support covariant re
turn types in overrides. Return type must be 'BaseModelWithRequired' to match overridden member 'BaseModelWithRequired.
PersistableModelCreateCore(BinaryData, ModelReaderWriterOptions)'

Metadata

Metadata

Assignees

Labels

emitter:client:csharpIssue for the C# client emitter: @typespec/http-client-csharp

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions