혼동될 수 있는 표현 문
qmllint에서는 이 경고 범주를 ‘ [confusing-expression-statement] ’로 표기합니다.
식 문장이 뚜렷한 효과를 나타내지 않음
무슨 일이 있었나요?
명백한 효과가 없는 표현식 문장을 사용했습니다.
왜 문제가 됩니까?
코드의 가독성을 떨어뜨리고 혼란을 야기할 수 있습니다. 일반적으로 이는 어떤 표현식의 결과가 무시되었음을 나타냅니다.
표현식 문은 아무런 효과가 없음에도 불구하고 바이트코드로 컴파일되어 런타임에 평가됩니다.
예시
import QtQuick
Item {
function add(a: int, b: int) : int {
a + b
}
}이 경고를 해결하려면 효과가 없는 표현식을 제거하거나 표현식 결과를 활용하십시오.
import QtQuick
Item {
function add(a: int, b: int) : int {
return a + b
}
}© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.