Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 75ca072

Browse files
committed
Assertion about getters for non-value type immutables.
1 parent 4058ce8 commit 75ca072

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libsolidity/codegen/ir/IRGenerator.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ string IRGenerator::generateGetter(VariableDeclaration const& _varDecl)
203203

204204
if (auto const* mappingType = dynamic_cast<MappingType const*>(type))
205205
return m_context.functionCollector().createFunction(functionName, [&]() {
206-
solAssert(!_varDecl.isConstant(), "");
206+
solAssert(!_varDecl.isConstant() && !_varDecl.immutable(), "");
207207
pair<u256, unsigned> slot_offset = m_context.storageLocationOfVariable(_varDecl);
208208
solAssert(slot_offset.second == 0, "");
209209
FunctionType funType(_varDecl);

0 commit comments

Comments
 (0)