Open YGuerin opened 4 years ago
B.Builder() from class B returns a class A object when B inherit from A
B.Builder() from class B returns a class B object when B inherit from A
Class A
[GeneratedImmutable] public partial class ClassA { [... some properties ...] }
Class B
[GeneratedImmutable] public partial class ClassB : ClassA { [... some properties ...] }
And call this wherever you want
var test = new ClassB.Builder() .WithPropertyFromClassA(...) .WithPropertyFromClassB(....) .ToImmutable();
Doesn't work because ClassB.Builder() is returning a ClassA object
Nuget Package: 5.7.0 Package Version(s): Uno.UI 3.0.11 / Uno.CodeGen 1.32.0 Affected platform(s): - [ X ] iOS - [ X ] Android - [ X ] WebAssembly - [ X ] Windows - [ ] Build tasks Visual Studio - [ X ] 2019 (version: 16.7.2 ) - [ ] 2017 (version: ) - [ ] 2017 Preview (version: ) - [ ] for Mac (version: ) Relevant plugins - [ ] Resharper (version: )
I'm submitting a...
Current behavior
B.Builder() from class B returns a class A object when B inherit from A
Expected behavior
B.Builder() from class B returns a class B object when B inherit from A
Minimal reproduction of the problem with instructions
Class A
Class B
And call this wherever you want
Doesn't work because ClassB.Builder() is returning a ClassA object
Environment