Closed gaplo917 closed 7 years ago
protoc --version
.proto
message MyTest { map<bool, string> bool_to_string = 12; };
I know map<bool,string> data structure is a very rare to be used. But it is allowed in protobuf definition.
map<bool,string>
So, I would consider it is a bug.
class override public func decodeToBuilder(jsonMap:Dictionary<String,Any>) throws -> Jsontest.MyTest.Builder { let resultDecodedBuilder = Jsontest.MyTest.Builder() if let jsonValueBoolToString = jsonMap["boolToString"] as? Dictionary<String, String> { var mapBoolToString = Dictionary<Bool, String>() for (keyBoolToString, valueBoolToString) in jsonValueBoolToString { let keyFromBoolToString = keyBoolToString mapBoolToString[keyFromBoolToString] = valueBoolToString } resultDecodedBuilder.boolToString = mapBoolToString } return resultDecodedBuilder }
// error : Ambiguous reference to member 'subscript' mapBoolToString[keyFromBoolToString] = valueBoolToString
Version of protoc (
protoc --version
)3.2.0
Version of ProtocolBuffers.framework
3.0.9
.proto
file to reproduceDescription
I know
map<bool,string>
data structure is a very rare to be used. But it is allowed in protobuf definition.So, I would consider it is a bug.