Skip to content

Commit 0425e4e

Browse files
Apply suggestions from code review
Co-authored-by: Kamil Śliwak <[email protected]>
1 parent fdf6b54 commit 0425e4e

File tree

6 files changed

+11
-14
lines changed

6 files changed

+11
-14
lines changed

Changelog.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ Language Features:
55

66
Compiler Features:
77
* ethdebug: Experimental support for instructions and source locations under EOF.
8-
* DocString Parser: Deprecation of inline assembly special comment `memory-safe-assembly`.
9-
* Syntax Checker: Deprecation of ABI coder v1.
10-
* Syntax Checker: Deprecation of `virtual` modifiers.
11-
* Type Checker: Deprecation of `send` and `transfer` functions on instances of `address`.
12-
* Type Checker: Deprecation of comparisons between `contract`-typed variables.
8+
* DocString Parser: Warn about deprecation of inline assembly special comment `memory-safe-assembly`.
9+
* Syntax Checker: Warn about deprecation of ABI coder v1.
10+
* Syntax Checker: Warn about deprecation of virtual modifiers.
11+
* Type Checker: Warn about deprecation of `send` and `transfer` functions on instances of `address`.
12+
* Type Checker: Warn about deprecation of comparisons between variables of contract types.
1313

1414
Bugfixes:
1515
* Assembler: Fix not using a fixed-width type for IDs being assigned to subassemblies nested more than one level away, resulting in inconsistent `--asm-json` output between target architectures.

docs/assembly.rst

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -382,8 +382,7 @@ of Solidity, you can use a special comment to annotate an assembly block as memo
382382
}
383383
384384
.. warning::
385-
The ``memory-safe-assembly`` special comment is deprecated and scheduled for
386-
removal in the next breaking version (0.9).
385+
The ``memory-safe-assembly`` special comment is deprecated and scheduled for removal.
387386
For new code targeting recent compilers, specify the assembly block annotation.
388387

389388
Advanced Safe Use of Memory

docs/control-structures.rst

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -700,10 +700,8 @@ and ``assert`` for internal error checking.
700700
uint balanceBeforeTransfer = address(this).balance;
701701
(bool success, ) = addr.call{value: msg.value / 2}("");
702702
require(success);
703-
// Since require will stop execution and
704-
// revert if success is false,
705-
// there should be no way for us to
706-
// still have half of the Ether.
703+
// Since require will stop execution and revert if success is false,
704+
// there should be no way for us to still have half of the Ether.
707705
assert(address(this).balance == balanceBeforeTransfer - msg.value / 2);
708706
return address(this).balance;
709707
}

libsolidity/analysis/DocStringTagParser.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ bool DocStringTagParser::visit(InlineAssembly const& _assembly)
215215
2424_error,
216216
_assembly.location(),
217217
"Natspec 'memory-safe-assembly' special comment for inline assembly is deprecated and scheduled for removal in the next breaking version (0.9). "
218-
"Instead, specify the assembly block annotation."
218+
"Use the memory-safe block annotation instead."
219219
);
220220
}
221221
else

libsolidity/analysis/SyntaxChecker.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ bool SyntaxChecker::visit(PragmaDirective const& _pragma)
150150
else
151151
m_sourceUnit->annotation().useABICoderV2 = (_pragma.literals()[1] == "v2");
152152

153-
if (_pragma.literals().size() > 1 && _pragma.literals()[1] == "v1")
153+
if (!m_sourceUnit->annotation().useABICoderV2)
154154
m_errorReporter.warning(
155155
9511_error,
156156
_pragma.location(),

libsolidity/analysis/TypeChecker.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3233,7 +3233,7 @@ bool TypeChecker::visit(MemberAccess const& _memberAccess)
32333233
_memberAccess.location(),
32343234
fmt::format(
32353235
"'{}' is deprecated and scheduled for removal in the next breaking version (0.9). "
3236-
"Use 'call{{value: <amount>}}()' instead.",
3236+
"Use 'call{{value: <amount>}}(\"\")' instead.",
32373237
funType->kind() == FunctionType::Kind::Send ? "send" : "transfer"
32383238
)
32393239
);

0 commit comments

Comments
 (0)