From 8ee5d3b274112d064328aa673496dfb484b03531 Mon Sep 17 00:00:00 2001 From: chriseth Date: Fri, 4 May 2018 16:20:38 +0200 Subject: New tests for wildcard assignments. --- test/libsolidity/syntaxTests/tupleAssignments/error_fill.sol | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 test/libsolidity/syntaxTests/tupleAssignments/error_fill.sol (limited to 'test/libsolidity/syntaxTests/tupleAssignments/error_fill.sol') diff --git a/test/libsolidity/syntaxTests/tupleAssignments/error_fill.sol b/test/libsolidity/syntaxTests/tupleAssignments/error_fill.sol new file mode 100644 index 00000000..5b7f870b --- /dev/null +++ b/test/libsolidity/syntaxTests/tupleAssignments/error_fill.sol @@ -0,0 +1,12 @@ +pragma experimental "v0.5.0"; +contract C { + function f() public pure returns (uint, uint, bytes32) { + uint a; + bytes32 b; + (a,) = f(); + (,b) = f(); + } +} +// ---- +// TypeError: (126-136): Different number of components on the left hand side (2) than on the right hand side (3). +// TypeError: (140-150): Different number of components on the left hand side (2) than on the right hand side (3). -- cgit v1.2.3