Commit 055aa15f authored by Christian Kamm's avatar Christian Kamm
Browse files

QmlJS: Remove overzealous 'undefined' check for enums.

The "value might be 'undefined'" warning triggered whenever the static
expression evaluator failed to produce a value. At the moment, it does
so for almost all non-trivial expressions.

The warning is now disabled.

Task-number: QTCREATORBUG-3208
parent c173959f
......@@ -109,10 +109,8 @@ public:
if (!enumValue->keys().contains(valueName)) {
_message.message = Check::tr("unknown value for enum");
}
} else if (_rhsValue->asUndefinedValue()) {
_message.kind = DiagnosticMessage::Warning;
_message.message = Check::tr("value might be 'undefined'");
} else if (! _rhsValue->asStringValue() && ! _rhsValue->asNumberValue()) {
} else if (! _rhsValue->asStringValue() && ! _rhsValue->asNumberValue()
&& ! _rhsValue->asUndefinedValue()) {
_message.message = Check::tr("enum value is not a string or number");
}
} else {
......
Markdown is supported
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