Skip to content

Commit

Permalink
fix: adds missing pointer symbol
Browse files Browse the repository at this point in the history
Signed-off-by: Vincent Biret <vibiret@microsoft.com>
  • Loading branch information
baywet committed Nov 26, 2024
1 parent 4ea9ae4 commit 5d2944e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Kiota.Builder/Writers/Go/CodeMethodWriter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,10 @@ private void WriteFactoryMethodBodyForIntersectionModel(CodeMethod codeElement,
}
else if (propertyType.TypeDefinition is CodeClass || propertyType.TypeDefinition is CodeInterface || propertyType.TypeDefinition is CodeEnum)
{
if (propertyType.TypeDefinition is CodeEnum)
{
propertyTypeImportName = conventions.GetTypeString(property.Type, parentClass, false, true);
}
writer.StartBlock($"if {GetTypeAssertion(valueVarName, propertyTypeImportName, "cast", "ok")}; ok {{");
valueVarName = "cast";
}
Expand Down

0 comments on commit 5d2944e

Please sign in to comment.