Commit b78330b2 authored by Sydney Acksman's avatar Sydney Acksman

Fix RepeatedExtensionValue.IsInitialized

parent ebf0bfae
...@@ -213,7 +213,23 @@ namespace Google.Protobuf ...@@ -213,7 +213,23 @@ namespace Google.Protobuf
public bool IsInitialized() public bool IsInitialized()
{ {
return field.All(m => m is IMessage && (m as IMessage).IsInitialized()); for (int i = 0; i < field.Count; i++)
{
var element = field[i];
if (element is IMessage)
{
if (!(element as IMessage).IsInitialized())
{
return false;
}
}
else
{
break;
}
}
return true;
} }
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment