There was an error while loading. Please reload this page.
1 parent 25756ad commit 10fa0f9Copy full SHA for 10fa0f9
1 file changed
lib/checkother.cpp
@@ -1776,7 +1776,8 @@ void CheckOtherImpl::checkConstVariable()
1776
usedInAssignment = true;
1777
break;
1778
}
1779
- if (!tok->valueType() || tok->valueType()->type == ValueType::Type::RECORD) {
+ if (!tok->valueType() || tok->valueType()->type == ValueType::Type::RECORD ||
1780
+ (tok->valueType()->reference != Reference::None && tok->valueType()->constness == 0)) {
1781
1782
1783
0 commit comments