Skip to content
Snippets Groups Projects
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
No related merge requests found
...@@ -109,10 +109,8 @@ public: ...@@ -109,10 +109,8 @@ public:
if (!enumValue->keys().contains(valueName)) { if (!enumValue->keys().contains(valueName)) {
_message.message = Check::tr("unknown value for enum"); _message.message = Check::tr("unknown value for enum");
} }
} else if (_rhsValue->asUndefinedValue()) { } else if (! _rhsValue->asStringValue() && ! _rhsValue->asNumberValue()
_message.kind = DiagnosticMessage::Warning; && ! _rhsValue->asUndefinedValue()) {
_message.message = Check::tr("value might be 'undefined'");
} else if (! _rhsValue->asStringValue() && ! _rhsValue->asNumberValue()) {
_message.message = Check::tr("enum value is not a string or number"); _message.message = Check::tr("enum value is not a string or number");
} }
} else { } else {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment