mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
parent
6d98b907ef
commit
9538024c81
@ -10,6 +10,7 @@ Bugfixes:
|
|||||||
* SMTChecker: Fix internal error when fixed points are used.
|
* SMTChecker: Fix internal error when fixed points are used.
|
||||||
* Type Checker: Disallow ``virtual`` and ``override`` for constructors.
|
* Type Checker: Disallow ``virtual`` and ``override`` for constructors.
|
||||||
* Type Checker: Fix several internal errors by performing size and recursiveness checks of types before the full type checking.
|
* Type Checker: Fix several internal errors by performing size and recursiveness checks of types before the full type checking.
|
||||||
|
* Type Checker: Fix internal error when assigning to empty tuples.
|
||||||
* Type Checker: Perform recursiveness check on structs declared at the file level.
|
* Type Checker: Perform recursiveness check on structs declared at the file level.
|
||||||
|
|
||||||
Build System:
|
Build System:
|
||||||
|
@ -1289,7 +1289,7 @@ void TypeChecker::checkExpressionAssignment(Type const& _type, Expression const&
|
|||||||
if (auto const* tupleExpression = dynamic_cast<TupleExpression const*>(&_expression))
|
if (auto const* tupleExpression = dynamic_cast<TupleExpression const*>(&_expression))
|
||||||
{
|
{
|
||||||
auto const* tupleType = dynamic_cast<TupleType const*>(&_type);
|
auto const* tupleType = dynamic_cast<TupleType const*>(&_type);
|
||||||
auto const& types = tupleType && tupleExpression->components().size() > 1 ? tupleType->components() : vector<TypePointer> { &_type };
|
auto const& types = tupleType && tupleExpression->components().size() != 1 ? tupleType->components() : vector<TypePointer> { &_type };
|
||||||
|
|
||||||
solAssert(
|
solAssert(
|
||||||
tupleExpression->components().size() == types.size() || m_errorReporter.hasErrors(),
|
tupleExpression->components().size() == types.size() || m_errorReporter.hasErrors(),
|
||||||
|
@ -0,0 +1,24 @@
|
|||||||
|
contract C {
|
||||||
|
function f0() public { (()) = 2; }
|
||||||
|
|
||||||
|
function f1() public pure { (()) = (); }
|
||||||
|
|
||||||
|
//#8711
|
||||||
|
function f2() internal pure returns (uint, uint) { return () = f2(); }
|
||||||
|
|
||||||
|
//#8277
|
||||||
|
function f3()public{return()=();}
|
||||||
|
|
||||||
|
//#8277
|
||||||
|
function f4 ( bytes32 hash , uint8 v , bytes32 r , bytes32 s , uint blockExpired , bytes32 salt ) public returns ( address ) {
|
||||||
|
require ( ( ( ) ) |= keccak256 ( abi . encodePacked ( blockExpired , salt ) ) ) ;
|
||||||
|
return ecrecover ( hash , v , r , s ) ;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// ----
|
||||||
|
// TypeError: (47-48): Type int_const 2 is not implicitly convertible to expected type tuple().
|
||||||
|
// TypeError: (178-182): Type tuple(uint256,uint256) is not implicitly convertible to expected type tuple().
|
||||||
|
// TypeError: (166-182): Different number of arguments in return statement than in returns declaration.
|
||||||
|
// TypeError: (399-466): Compound assignment is not allowed for tuple types.
|
||||||
|
// TypeError: (410-466): Type bytes32 is not implicitly convertible to expected type tuple().
|
||||||
|
// TypeError: (389-396): No matching declaration found after argument-dependent lookup.
|
Loading…
Reference in New Issue
Block a user