Bug 929491 - Include dictionary and object types in union construction error messages. r=bz

This commit is contained in:
Reuben Morais 2013-11-02 16:18:35 -02:00
parent 569cfb6eb1
commit 741f1170ee

View File

@ -2955,6 +2955,7 @@ for (uint32_t i = 0; i < length; ++i) {
assert len(dictionaryMemberTypes) == 1
name = dictionaryMemberTypes[0].inner.identifier.name
setDictionary = CGGeneric("done = (failed = !%s.TrySetTo%s(cx, ${val}, ${mutableVal}, tryNext)) || !tryNext;" % (unionArgumentObj, name))
names.append(name)
else:
setDictionary = None
@ -2963,6 +2964,7 @@ for (uint32_t i = 0; i < length; ++i) {
assert len(objectMemberTypes) == 1
object = CGGeneric("%s.SetToObject(cx, argObj);\n"
"done = true;" % unionArgumentObj)
names.append(objectMemberTypes[0].name)
else:
object = None