Skip to content

Commit 40a2001

Browse files
authored
Merge branch 'develop' into develop
2 parents c1bcf5f + aa4ec3e commit 40a2001

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

docs/assembly.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,7 @@ shadow any declaration visible in the scope of the inline assembly block
216216
Since Solidity 0.7.0, variables and functions declared inside the
217217
inline assembly block may not contain ``.``, but using ``.`` is
218218
valid to access Solidity variables from outside the inline assembly block.
219+
However, it is still valid to use dots if you use Solidity in Yul-only mode.
219220

220221
Things to Avoid
221222
---------------

libsolidity/ast/Types.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1648,7 +1648,7 @@ BoolResult ArrayType::isImplicitlyConvertibleTo(Type const& _convertTo) const
16481648
}
16491649
else
16501650
{
1651-
// Conversion to storage pointer or to memory, we de not copy element-for-element here, so
1651+
// Conversion to storage pointer or to memory, we do not copy element-for-element here, so
16521652
// require that the base type is the same, not only convertible.
16531653
// This disallows assignment of nested dynamic arrays from storage to memory for now.
16541654
if (

libsolidity/lsp/RenameSymbol.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,8 @@ void RenameSymbol::operator()(MessageID _id, Json const& _args)
6565
.translateLineColumnToPosition(lineColumn);
6666
solAssert(cursorBytePosition.has_value(), "Expected source pos");
6767

68-
extractNameAndDeclaration(*sourceNode, *cursorBytePosition);
68+
if (sourceNode != nullptr)
69+
extractNameAndDeclaration(*sourceNode, *cursorBytePosition);
6970

7071
// Find all source units using this symbol
7172
for (auto const& [name, content]: fileRepository().sourceUnits())
@@ -156,7 +157,8 @@ void RenameSymbol::extractNameAndDeclaration(ASTNode const& _node, int _cursorBy
156157
else
157158
solAssert(false, "Unexpected ASTNODE id: " + std::to_string(_node.id()));
158159

159-
lspDebug(fmt::format("Goal: rename '{}', loc: {}-{}", m_symbolName, m_declarationToRename->nameLocation().start, m_declarationToRename->nameLocation().end));
160+
if (m_declarationToRename != nullptr)
161+
lspDebug(fmt::format("Goal: rename '{}', loc: {}-{}", m_symbolName, m_declarationToRename->nameLocation().start, m_declarationToRename->nameLocation().end));
160162
}
161163

162164
void RenameSymbol::extractNameAndDeclaration(ImportDirective const& _importDirective, int _cursorBytePosition)

0 commit comments

Comments
 (0)