Skip to content

Commit 10fa0f9

Browse files
committed
fix
1 parent 25756ad commit 10fa0f9

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

lib/checkother.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1776,7 +1776,8 @@ void CheckOtherImpl::checkConstVariable()
17761776
usedInAssignment = true;
17771777
break;
17781778
}
1779-
if (!tok->valueType() || tok->valueType()->type == ValueType::Type::RECORD) {
1779+
if (!tok->valueType() || tok->valueType()->type == ValueType::Type::RECORD ||
1780+
(tok->valueType()->reference != Reference::None && tok->valueType()->constness == 0)) {
17801781
usedInAssignment = true;
17811782
break;
17821783
}

0 commit comments

Comments
 (0)