Properly copy maps with string keys but pod values.
Add tests to cover all the common special casing in the runtime code to
ensure things come out correctly.
diff --git a/objectivec/GPBMessage.m b/objectivec/GPBMessage.m
index 90485bd..3be20b6 100644
--- a/objectivec/GPBMessage.m
+++ b/objectivec/GPBMessage.m
@@ -969,7 +969,8 @@
newValue = [value copyWithZone:zone];
}
} else {
- if (field.mapKeyDataType == GPBDataTypeString) {
+ if ((field.mapKeyDataType == GPBDataTypeString) &&
+ GPBFieldDataTypeIsObject(field)) {
// NSDictionary
newValue = [value mutableCopyWithZone:zone];
} else {