Skip to content

Commit

Permalink
fix(codegen/plc4x): fixed cases where byte and short didn't work for …
Browse files Browse the repository at this point in the history
…discriminators
  • Loading branch information
sruehl committed Mar 1, 2022
1 parent 7623887 commit fcd6c8d
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ public<#if type.isDiscriminatedParentTypeDefinition()> abstract</#if> class ${ty
<#if discriminatorType.isEnumTypeReference()>
return ${helper.getLanguageTypeNameForTypeReference(discriminatorType)}.${helper.toParseExpression(null, discriminatorType, discriminatorValue, parserArguments)};
<#else>
return ${helper.toParseExpression(null, discriminatorType, discriminatorValue, parserArguments)};
return (${helper.getLanguageTypeNameForTypeReference(discriminatorType, true)}) ${helper.toParseExpression(null, discriminatorType, discriminatorValue, parserArguments)};
</#if>
<#else>
return ${helper.getNullValueForTypeReference(discriminatorType)};
Expand Down

0 comments on commit fcd6c8d

Please sign in to comment.