Commit 99467111 authored by Leandro Melo's avatar Leandro Melo
Browse files

QmlJS: Don't detect type from expression if the type is given explicitly.

To make sure
property color foo: "white"
is of type color, not string.

Done-with: ckamm
parent 302e93d6
......@@ -3063,7 +3063,8 @@ bool ASTPropertyReference::getSourceLocation(QString *fileName, int *line, int *
const Value *ASTPropertyReference::value(Context *context) const
if (_ast->expression) {
if (_ast->expression
&& (!_ast->memberType || _ast->memberType->asString() == QLatin1String("variant"))) {
Evaluate check(context);
return check(_ast->expression);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment