-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
Since we support inheritance on the C# side, but want to convert it to "extension", we need to prevent the following case:
interface A { int PropA { get; set; } }
interface B { int PropA { get; set; } }
class C : A, B { public int PropA { get; set; } }
Currently, both A and B will have PropA. C won't, but it will extend both A and B and the resulting type will need to support both. That is wrong as we don't really know which PropA we are talking about. And if these two differ in type, e.g. when they are done like this:
interface A { int PropA { get; set; } }
interface B { string PropA { get; set; } }
class C : A, B { int A.PropA { get; set; } string B.PropA { get; set; } }
or like that
interface A { int PropA { get; set; } }
interface B { string PropA { get; set; } }
class M : A { public int PropA { get; set; } }
class C : M, B { new public string PropA { get; set; } }
we have totally undecidable case.
I suggest blocking this - i.e. when any DTO has a duplicate property when "flattened", reject it. What are your thoughts?
marcin-dardzinski and shilangyu
Metadata
Metadata
Assignees
Labels
No labels