QmlJS: Avoid infinite recursion when encountering property loops.

Such as
property int foo: bar
property int bar: foo.

Task-number: QTCREATORBUG-1389
Reviewed-by: Roberto Raggi
This commit is contained in:
Christian Kamm
2010-06-08 15:36:06 +02:00
parent 181cecbb32
commit 313d30654e
3 changed files with 25 additions and 4 deletions

View File

@@ -53,7 +53,7 @@ const Interpreter::Value *Evaluate::operator()(AST::Node *ast)
const Value *result = reference(ast);
if (const Reference *ref = value_cast<const Reference *>(result))
result = ref->value(_context);
result = _context->lookupReference(ref);
if (! result)
result = _engine->undefinedValue();