혼란스러운 표현식 문
이 경고 카테고리의 철자는 [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.