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
This commit is contained in:
Leandro Melo
2010-07-27 13:42:32 +02:00
parent 302e93d67f
commit 9946711166

View File

@@ -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);
}