Skip to content

Commit

Permalink
Fix #350
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Ganss committed Aug 23, 2022
1 parent 83ad64c commit 544994f
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
21 changes: 21 additions & 0 deletions XmlSchemaClassGenerator.Tests/xsd/simple/ng.xsd
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns="http://car/1.0"
attributeFormDefault="unqualified"
elementFormDefault="qualified"
targetNamespace="http://car/1.0"
xmlns:xs="http://www.w3.org/2001/XMLSchema">

<xs:group name="LimitedEditionType">
<xs:sequence>
<xs:element nillable="true" name="IsAvailable" type="xs:boolean" />
</xs:sequence>
</xs:group>

<xs:complexType name="PorscheType">
<xs:sequence>
<xs:group ref="LimitedEditionType"/>
<xs:element name="Model" type="xs:string" />
</xs:sequence>
</xs:complexType>

</xs:schema>
2 changes: 1 addition & 1 deletion XmlSchemaClassGenerator/TypeModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -664,7 +664,7 @@ public void AddInterfaceMembersTo(CodeTypeDeclaration typeDeclaration)
var isPrivateSetter = IsPrivateSetter;
var typeReference = TypeReference;

if (isNullableValueType && Configuration.GenerateNullables)
if ((isNullableValueType || IsNillableValueType) && Configuration.GenerateNullables)
typeReference = NullableTypeRef(typeReference);

member = new CodeMemberProperty
Expand Down

0 comments on commit 544994f

Please sign in to comment.