Skip to content

Commit

Permalink
Merge pull request #2444 from alwayshang/master
Browse files Browse the repository at this point in the history
chore: fix some typos in comments
  • Loading branch information
0xalpharush authored Apr 24, 2024
2 parents 7f82f4a + 7fff11b commit 5636dff
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion slither/detectors/compiler_bugs/reused_base_constructor.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class ReusedBaseConstructor(AbstractDetector):
ARGUMENT = "reused-constructor"
HELP = "Reused base constructor"
IMPACT = DetectorClassification.MEDIUM
# The confidence is medium, because prior Solidity 0.4.22, we cant differentiate
# The confidence is medium, because prior Solidity 0.4.22, we can't differentiate
# contract C is A() {
# to
# contract C is A {
Expand Down
2 changes: 1 addition & 1 deletion slither/solc_parsing/declarations/contract.py
Original file line number Diff line number Diff line change
Expand Up @@ -593,7 +593,7 @@ def _analyze_params_elements( # pylint: disable=too-many-arguments,too-many-loc
def analyze_constant_state_variables(self) -> None:
for var_parser in self._variables_parser:
if var_parser.underlying_variable.is_constant:
# cant parse constant expression based on function calls
# can't parse constant expression based on function calls
try:
var_parser.analyze(self)
except (VariableNotFound, KeyError) as e:
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/core/test_source_mapping.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def test_source_mapping_inheritance(solc_binary_path, solc_version):
assert {(x.start, x.end) for x in slither.offset_to_implementations(file, 203)} == {(193, 230)}

# Offset 93 is the call to f() in A.test()
# This can lead to three differents functions, depending on the current contract's context
# This can lead to three different functions, depending on the current contract's context
functions = slither.offset_to_objects(file, 93)
print(functions)
assert len(functions) == 3
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/slithir/test_data/ternary_expressions.sol
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ contract C {
// TODO
// 1) support variable declarations
//uint min = 1 > 0 ? 1 : 2;
// 2) suppory ternary index range access
// 2) support ternary index range access
// function e(bool cond, bytes calldata x) external {
// bytes memory a = x[cond ? 1 : 2 :];
// }
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/slithir/test_ssa_generation.py
Original file line number Diff line number Diff line change
Expand Up @@ -550,7 +550,7 @@ def test_storage_refers_to(slither_from_solidity_source):
entryphi = [x for x in phinodes if x.lvalue in sphi.lvalue.refers_to]
assert len(entryphi) == 2

# The remaining two phis are the ones recording that write through ReferenceVariable occured
# The remaining two phis are the ones recording that write through ReferenceVariable occurred
for ephi in entryphi:
phinodes.remove(ephi)
phinodes.remove(sphi)
Expand Down

0 comments on commit 5636dff

Please sign in to comment.