diff -r 372adeda3b22 -r 82b1f8bc93a9 src/compiler/NameBinding.cpp --- a/src/compiler/NameBinding.cpp Fri Dec 28 22:47:05 2012 -0800 +++ b/src/compiler/NameBinding.cpp Sat Dec 29 00:12:27 2012 -0800 @@ -572,15 +572,16 @@ // Do some extra inference based on the initializer, if present. Expression *init = node->initialization(); - if (init && - init->isArrayLiteral() && - init->toArrayLiteral()->isFixed()) - { - Local contained(zone_, type->isArray() - ? ArrayType::cast(type)->contained() - : type); - if (!inferFixedArrayDimensions(init->toArrayLiteral(), contained, dims, levels)) - return; + if (init) { + if (init->isArrayLiteral() && init->toArrayLiteral()->isFixed()) { + Local contained(zone_, type->isArray() + ? ArrayType::cast(type)->contained() + : type); + if (!inferFixedArrayDimensions(init->toArrayLiteral(), contained, dims, levels)) + return; + } else if (init->isStringLiteral()) { + dims[levels - 1] = init->toStringLiteral()->string()->length() + 1; + } } // If we got extra dimensions, we need to build a new type.