Skip to content

Commit

Permalink
- fixes a bug where the obsolete constructor would have the wrong inh…
Browse files Browse the repository at this point in the history
…eritance type in go

Signed-off-by: Vincent Biret <vibiret@microsoft.com>
  • Loading branch information
baywet committed Sep 26, 2023
1 parent a9bfa22 commit 3429608
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Kiota.Builder/KiotaBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1288,7 +1288,7 @@ codeType.TypeDefinition is CodeClass codeClass &&
var obsoleteFactoryMethod = (CodeMethod)originalFactoryMethod.Clone();
obsoleteFactoryMethod.ReturnType = new CodeType { Name = obsoleteTypeName, TypeDefinition = obsoleteClassDefinition };
obsoleteClassDefinition.AddMethod(obsoleteFactoryMethod);
obsoleteClassDefinition.StartBlock.Inherits = codeType;
obsoleteClassDefinition.StartBlock.Inherits = (CodeType)codeType.Clone();
var obsoleteClass = codeClass.Parent switch
{
CodeClass modelParentClass => modelParentClass.AddInnerClass(obsoleteClassDefinition).First(),
Expand Down

0 comments on commit 3429608

Please sign in to comment.