aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/corelib/language/evaluatorscriptclass.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/corelib/language/evaluatorscriptclass.cpp')
-rw-r--r--src/lib/corelib/language/evaluatorscriptclass.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lib/corelib/language/evaluatorscriptclass.cpp b/src/lib/corelib/language/evaluatorscriptclass.cpp
index 74677ff56..4b3f11f00 100644
--- a/src/lib/corelib/language/evaluatorscriptclass.cpp
+++ b/src/lib/corelib/language/evaluatorscriptclass.cpp
@@ -150,6 +150,7 @@ private:
// Clone value but without alternatives.
JSSourceValuePtr outerValue = JSSourceValue::create();
outerValue->setFile(value->file());
+ outerValue->setHasFunctionForm(value->hasFunctionForm());
outerValue->setSourceCode(value->sourceCode());
outerValue->setBaseValue(value->baseValue());
outerValue->setLocation(value->location());
@@ -185,7 +186,7 @@ private:
}
pushScope(extraScope);
const CodeLocation valueLocation = value->location();
- *result = engine->evaluate(value->sourceCode(), valueLocation.fileName(),
+ *result = engine->evaluate(value->sourceCodeForEvaluation(), valueLocation.fileName(),
valueLocation.line());
popScopes();
}