diff options
author | Ulf Hermann <ulf.hermann@qt.io> | 2023-11-01 19:06:11 +0100 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2023-11-04 03:52:10 +0000 |
commit | 6031f2e988a6d304c1b531308b4c08e3c7552e7e (patch) | |
tree | e6a68ada130a31840f89f1778869526e364f51f1 | |
parent | 7935b601f33a9b391a45d06e228959d633a950af (diff) |
QmlCompiler: Fix error message on shadow checking
The base type does not have to be the accumulator. The accumulator
doesn't even have to exist, in which case this would crash.
Pick-to: 6.5 6.2
Change-Id: I839d0a514fc1b628a829ced96dc3245e4c3eec22
Reviewed-by: Olivier De Cannière <olivier.decanniere@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
(cherry picked from commit aa63c03b914e073df67fc35977062a3c5dcb1c60)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r-- | src/qmlcompiler/qqmljsshadowcheck.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/qmlcompiler/qqmljsshadowcheck.cpp b/src/qmlcompiler/qqmljsshadowcheck.cpp index cce320f27d..5b07140490 100644 --- a/src/qmlcompiler/qqmljsshadowcheck.cpp +++ b/src/qmlcompiler/qqmljsshadowcheck.cpp @@ -137,8 +137,7 @@ void QQmlJSShadowCheck::checkShadowing( } m_logger->log( - u"Member %1 of %2 can be shadowed"_s.arg( - memberName, m_state.accumulatorIn().descriptiveName()), + u"Member %1 of %2 can be shadowed"_s.arg(memberName, baseType.descriptiveName()), qmlCompiler, currentSourceLocation()); // Make it "var". We don't know what it is. |