QmlJS: Fix checking for case and default blocks

case and default blocks inside a switch statement are just
special statement lists which need proper handling to avoid
wrong warnings regarding using standalone blocks.

Task-number: QTCREATORBUG-24214
Change-Id: Ia682b13ed4df21c5831308193d5abaf5163bde59
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
This commit is contained in:
Christian Stenger
2021-05-04 11:15:05 +02:00
parent a86da031c7
commit 845afb25fc
2 changed files with 12 additions and 0 deletions

View File

@@ -122,6 +122,8 @@ private:
bool isQtQuick2() const;
bool isQtQuick2Ui() const;
bool isCaseOrDefault(AST::Node *n);
AST::Node *parent(int distance = 0);
Document::Ptr _doc;