mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Merge remote-tracking branch 'origin/develop' into breaking
This commit is contained in:
@@ -58,9 +58,8 @@ evmasm::AssemblyItems compileContract(std::shared_ptr<CharStream> _sourceCode)
|
||||
BOOST_REQUIRE_NO_THROW(sourceUnit = parser.parse(make_shared<Scanner>(_sourceCode)));
|
||||
BOOST_CHECK(!!sourceUnit);
|
||||
|
||||
map<ASTNode const*, shared_ptr<DeclarationContainer>> scopes;
|
||||
GlobalContext globalContext;
|
||||
NameAndTypeResolver resolver(globalContext, solidity::test::CommonOptions::get().evmVersion(), scopes, errorReporter);
|
||||
NameAndTypeResolver resolver(globalContext, solidity::test::CommonOptions::get().evmVersion(), errorReporter);
|
||||
DeclarationTypeChecker declarationTypeChecker(errorReporter, solidity::test::CommonOptions::get().evmVersion());
|
||||
solAssert(Error::containsOnlyWarnings(errorReporter.errors()), "");
|
||||
resolver.registerDeclarations(*sourceUnit);
|
||||
|
||||
@@ -116,8 +116,7 @@ bytes compileFirstExpression(
|
||||
ErrorList errors;
|
||||
ErrorReporter errorReporter(errors);
|
||||
GlobalContext globalContext;
|
||||
map<ASTNode const*, shared_ptr<DeclarationContainer>> scopes;
|
||||
NameAndTypeResolver resolver(globalContext, solidity::test::CommonOptions::get().evmVersion(), scopes, errorReporter);
|
||||
NameAndTypeResolver resolver(globalContext, solidity::test::CommonOptions::get().evmVersion(), errorReporter);
|
||||
resolver.registerDeclarations(*sourceUnit);
|
||||
for (ASTPointer<ASTNode> const& node: sourceUnit->nodes())
|
||||
if (ContractDefinition* contract = dynamic_cast<ContractDefinition*>(node.get()))
|
||||
|
||||
@@ -56,6 +56,7 @@ contract C {
|
||||
}
|
||||
}
|
||||
// ====
|
||||
// compileViaYul: also
|
||||
// EVMVersion: >homestead
|
||||
// ----
|
||||
// test_bytes() ->
|
||||
|
||||
@@ -57,6 +57,7 @@ contract C {
|
||||
}
|
||||
}
|
||||
// ====
|
||||
// compileViaYul: also
|
||||
// EVMVersion: >homestead
|
||||
// ----
|
||||
// test_bytes() ->
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
contract C {
|
||||
function f() public returns (bytes1) {
|
||||
bytes memory x = new bytes(35);
|
||||
assert(x.length == 35);
|
||||
x[34] = "A";
|
||||
return (x[34]);
|
||||
}
|
||||
}
|
||||
// ====
|
||||
// compileViaYul: also
|
||||
// ----
|
||||
// f() -> "A"
|
||||
@@ -9,5 +9,7 @@ contract C {
|
||||
}
|
||||
}
|
||||
|
||||
// ====
|
||||
// compileViaYul: also
|
||||
// ----
|
||||
// test() -> 0x20, 0x5, "12345"
|
||||
|
||||
@@ -19,5 +19,4 @@ contract LoopFor2 {
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// Warning: (316-336): Assertion violation happens here
|
||||
// Warning: (363-382): Assertion violation happens here
|
||||
|
||||
@@ -19,6 +19,5 @@ contract LoopFor2 {
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// Warning: (317-337): Assertion violation happens here
|
||||
// Warning: (341-360): Assertion violation happens here
|
||||
// Warning: (364-383): Assertion violation happens here
|
||||
|
||||
@@ -21,6 +21,5 @@ contract LoopFor2 {
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// Warning: (296-316): Assertion violation happens here
|
||||
// Warning: (320-339): Assertion violation happens here
|
||||
// Warning: (343-362): Assertion violation happens here
|
||||
|
||||
@@ -9,4 +9,6 @@ contract C {
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// Warning: (129-143): Error trying to invoke SMT solver.
|
||||
// Warning: (147-161): Error trying to invoke SMT solver.
|
||||
// Warning: (147-161): Assertion violation happens here
|
||||
|
||||
@@ -10,4 +10,6 @@ contract C {
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// Warning: (163-184): Error trying to invoke SMT solver.
|
||||
// Warning: (188-209): Error trying to invoke SMT solver.
|
||||
// Warning: (188-209): Assertion violation happens here
|
||||
|
||||
@@ -10,4 +10,6 @@ contract C {
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// Warning: (171-190): Error trying to invoke SMT solver.
|
||||
// Warning: (194-213): Error trying to invoke SMT solver.
|
||||
// Warning: (194-213): Assertion violation happens here
|
||||
|
||||
@@ -16,4 +16,3 @@ contract C
|
||||
// ====
|
||||
// SMTSolvers: z3
|
||||
// ----
|
||||
// Warning: (174-194): Assertion violation happens here
|
||||
|
||||
@@ -6,3 +6,5 @@ contract C {
|
||||
assert(x / y == 3);
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// Warning: (107-125): Error trying to invoke SMT solver.
|
||||
|
||||
@@ -6,3 +6,5 @@ contract C {
|
||||
assert(x / y == 3);
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// Warning: (105-123): Error trying to invoke SMT solver.
|
||||
|
||||
@@ -6,3 +6,5 @@ contract C {
|
||||
assert(x / y == -3);
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// Warning: (106-125): Error trying to invoke SMT solver.
|
||||
|
||||
@@ -6,3 +6,5 @@ contract C {
|
||||
assert(x / y == -3);
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// Warning: (106-125): Error trying to invoke SMT solver.
|
||||
|
||||
@@ -6,3 +6,5 @@ contract C {
|
||||
assert(x / y == 3);
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// Warning: (107-125): Error trying to invoke SMT solver.
|
||||
|
||||
@@ -8,3 +8,5 @@ contract C {
|
||||
assert(z1 == z2);
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// Warning: (166-182): Error trying to invoke SMT solver.
|
||||
|
||||
@@ -8,3 +8,5 @@ contract C
|
||||
assert((y % 2) == 0);
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// Warning: (122-142): Error trying to invoke SMT solver.
|
||||
|
||||
@@ -8,3 +8,5 @@ contract C
|
||||
assert(z < y);
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// Warning: (126-139): Error trying to invoke SMT solver.
|
||||
|
||||
@@ -8,3 +8,5 @@ contract C
|
||||
assert(z < 100_000);
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// Warning: (130-149): Error trying to invoke SMT solver.
|
||||
|
||||
Reference in New Issue
Block a user