Add support for dictionaries containing 'any'.

This commit is contained in:
Ms2ger 2014-04-24 21:50:20 +02:00
parent b193767350
commit 90f4d256cf
2 changed files with 3 additions and 4 deletions

View file

@ -765,10 +765,6 @@ def getJSToNativeConversionTemplate(type, descriptorProvider, failureCode=None,
if type.isAny():
assert not isEnforceRange and not isClamp
if isMember:
raise TypeError("Can't handle member 'any'; need to sort out "
"rooting issues")
declType = CGGeneric("JSVal")
value = CGGeneric("${val}")
if isOptional:
@ -4236,6 +4232,8 @@ class CGDictionary(CGThing):
return '~""'
elif ty.startswith("Option"):
return "None"
elif ty == "JSVal":
return "UndefinedValue()"
else:
return "/* uh oh: %s */" % ty