Skip to content

Repeated fields with primitive non Object types throw an exception when printing #26

@tedjt

Description

@tedjt

I have a message that defines a repeated int64. In the generated MessagePb objective-C class,

the - (void) writeDescriptionTo:(NSMutableString_) output withIndent:(NSString_) indent

method fails since the auto-generated code attempts to do fast enumeration over the items like so

for (NSNumber* value in self.itemsArray) {
[output appendFormat:@"%@%@: %@\n", indent, @"items", value];
}

in this case 'value' is actually of type PBArrayValueTypeInt64, which causes the exception to be thrown in line 186 of PBArray.m

Suggestions on how to fix this to return a new array of NSNumbers around primitive types?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions