From cfd3eda076e81d56f985c830663ae93317b6ef8b Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Tue, 18 Mar 2014 09:12:42 +0100 Subject: Fixes to for...in statement Properly convert the argument to an object if it's not null or undefined as mandated by the standard. Add a similar test case for the with statement. Change-Id: Idd8e245e8dae4803eb0e2010e3d43bb912670444 Reviewed-by: Simon Hausmann --- src/qml/compiler/qv4isel_p.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/qml/compiler/qv4isel_p.cpp') diff --git a/src/qml/compiler/qv4isel_p.cpp b/src/qml/compiler/qv4isel_p.cpp index 0e429423ab..0dbf58ad5c 100644 --- a/src/qml/compiler/qv4isel_p.cpp +++ b/src/qml/compiler/qv4isel_p.cpp @@ -313,7 +313,7 @@ void IRDecoder::callBuiltin(IR::Call *call, IR::Temp *result) } return; case IR::Name::builtin_foreach_iterator_object: { - IR::Temp *arg = call->args->expr->asTemp(); + IR::Expr *arg = call->args->expr; assert(arg != 0); callBuiltinForeachIteratorObject(arg, result); } return; -- cgit v1.2.3