Skip to content

Commit

Permalink
Fixed setter for value types and renamed classes
Browse files Browse the repository at this point in the history
  • Loading branch information
JordanL8 committed Mar 12, 2024
1 parent ecea41f commit 1c10078
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Generator/Generators/CSharp/CSharpSources.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1027,7 +1027,7 @@ private void GenerateFieldSetter(Field field, Class @class, QualifiedType fieldT
{
if (@class.IsInNamespace("Kyt"))
{
if (field.Type.IsClass() && !field.Type.IsPointer())
if (field.Type.IsClass() && !field.Type.IsPointer() && !@class.IsValueType)
{
if (field.Type.TryGetClass(out Class fieldClass) && !(fieldClass is ClassTemplateSpecialization) && !fieldClass.IsValueType)
{
Expand All @@ -1041,7 +1041,7 @@ private void GenerateFieldSetter(Field field, Class @class, QualifiedType fieldT
WriteLine($"var src = value.{Helpers.InstanceIdentifier};");
if (IsInternalClassNested(fieldClass))
typeName.RemoveNamespace();
WriteLine($"{fieldClass}.__Internal.OperatorEqual(dest, src);");
WriteLine($"{fieldClass.Name}.__Internal.OperatorEqual(dest, src);");
return;
}
}
Expand Down

0 comments on commit 1c10078

Please sign in to comment.