Skip to content

Commit 95a8cf9

Browse files
committed
Prevent possible duplication of properties
Signed-off-by: Dimitar Dobrev <[email protected]>
1 parent fd713a6 commit 95a8cf9

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/Generator/Passes/GetterSetterToPropertyPass.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,8 @@ protected IEnumerable<Property> GenerateProperties(Class @class)
7474
List<Property> properties = GetProperties(@class);
7575
foreach (Method method in @class.Methods.Where(
7676
m => !m.IsConstructor && !m.IsDestructor && !m.IsOperator && m.IsGenerated &&
77+
(properties.All(p => p.GetMethod != m && p.SetMethod != m) ||
78+
m.OriginalFunction != null) &&
7779
m.SynthKind != FunctionSynthKind.DefaultValueOverload &&
7880
m.SynthKind != FunctionSynthKind.ComplementOperator &&
7981
!m.ExcludeFromPasses.Contains(typeof(GetterSetterToPropertyPass))))

0 commit comments

Comments
 (0)