aboutsummaryrefslogtreecommitdiff
path: root/src/ProtoGen/RepeatedEnumFieldGenerator.cs
diff options
context:
space:
mode:
authorcsharptest <roger@csharptest.net>2011-09-16 12:21:00 -0500
committerrogerk <devnull@localhost>2011-09-16 12:21:00 -0500
commit4ecebd8b4a34c1f902176395024185f1724cb2eb (patch)
treeb66dbd1ef1b8fc8f4b4813f4ac7522fc25d637dc /src/ProtoGen/RepeatedEnumFieldGenerator.cs
parent8f0dcf3df1548a1eff0bed54a9b992f55b8f72d5 (diff)
downloadprotobuf-4ecebd8b4a34c1f902176395024185f1724cb2eb.tar.gz
protobuf-4ecebd8b4a34c1f902176395024185f1724cb2eb.tar.bz2
protobuf-4ecebd8b4a34c1f902176395024185f1724cb2eb.zip
Tests and fixes for double-enumeration on AddRange and adding of null to PopsicleList
Diffstat (limited to 'src/ProtoGen/RepeatedEnumFieldGenerator.cs')
-rw-r--r--src/ProtoGen/RepeatedEnumFieldGenerator.cs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ProtoGen/RepeatedEnumFieldGenerator.cs b/src/ProtoGen/RepeatedEnumFieldGenerator.cs
index 5880390b..339e8181 100644
--- a/src/ProtoGen/RepeatedEnumFieldGenerator.cs
+++ b/src/ProtoGen/RepeatedEnumFieldGenerator.cs
@@ -88,7 +88,7 @@ namespace Google.ProtocolBuffers.ProtoGen
writer.WriteLine(" return this;");
writer.WriteLine("}");
writer.WriteLine("public Builder AddRange{0}(scg::IEnumerable<{1}> values) {{", PropertyName, TypeName);
- writer.WriteLine(" base.AddRange(values, result.{0}_);", Name);
+ writer.WriteLine(" result.{0}_.Add(values);", Name);
writer.WriteLine(" return this;");
writer.WriteLine("}");
writer.WriteLine("public Builder Clear{0}() {{", PropertyName);
@@ -100,7 +100,7 @@ namespace Google.ProtocolBuffers.ProtoGen
public void GenerateMergingCode(TextGenerator writer)
{
writer.WriteLine("if (other.{0}_.Count != 0) {{", Name);
- writer.WriteLine(" base.AddRange(other.{0}_, result.{0}_);", Name);
+ writer.WriteLine(" result.{0}_.Add(other.{0}_);", Name);
writer.WriteLine("}");
}