Skip to content

Commit d3ec836

Browse files
committed
Forgot to limit property implementation generation only to DIM-based properties.
1 parent f1cd7cc commit d3ec836

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

tools/generator/ClassGen.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -462,7 +462,7 @@ public override void Generate (StreamWriter sw, string indent, CodeGenerationOpt
462462

463463
GenConstructors (sw, indent + "\t", opt);
464464

465-
GenerateImplementedProperties (sw, indent + "\t", IsFinal, opt);
465+
GenerateImplementedProperties (Properties, sw, indent + "\t", IsFinal, opt);
466466
GenMethods (sw, indent + "\t", opt);
467467

468468
if (IsAbstract)

tools/generator/GenBase.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -599,9 +599,9 @@ public List<InterfaceGen> GetAllDerivedInterfaces ()
599599
return result;
600600
}
601601

602-
protected void GenerateImplementedProperties (StreamWriter sw, string indent, bool isFinal, CodeGenerationOptions opt)
602+
protected void GenerateImplementedProperties (IEnumerable<Property> targetProperties, StreamWriter sw, string indent, bool isFinal, CodeGenerationOptions opt)
603603
{
604-
foreach (Property prop in Properties) {
604+
foreach (Property prop in targetProperties) {
605605
bool get_virt = prop.Getter.IsVirtual;
606606
bool set_virt = prop.Setter == null ? false : prop.Setter.IsVirtual;
607607
prop.Getter.IsVirtual = !isFinal && get_virt;

tools/generator/InterfaceGen.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ void GenProperties (StreamWriter sw, string indent, CodeGenerationOptions opt)
223223
{
224224
foreach (Property prop in Properties.Where (p => !p.Getter.IsStatic && !p.Getter.IsInterfaceDefaultMethod))
225225
prop.GenerateDeclaration (sw, indent, opt, this, AssemblyQualifiedName + "Invoker");
226-
base.GenerateImplementedProperties (sw, indent, false, opt);
226+
base.GenerateImplementedProperties (Properties.Where (p => p.Getter.IsInterfaceDefaultMethod), sw, indent, false, opt);
227227
}
228228

229229
void GenerateInvoker (StreamWriter sw, string indent, CodeGenerationOptions opt)

0 commit comments

Comments
 (0)