Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The PR seems to add 3 new tests now. Was it meant to be a rename? If so, you probably forgot to commit the removal of the file with the old name.

Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
==== Source: s1.sol ====
function f(uint24) pure returns (uint) { return 24; }
function g(bool) pure returns (bool) { return true; }
==== Source: s2.sol ====
import {f as g, g as g} from "s1.sol";
contract C {
function foo() public pure returns (uint, bool) {
return (g(2), g(false));
}
}
// ----
// foo() -> 24, true
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
==== Source: s1.sol ====
function f(uint) pure returns (uint) { return 24; }
function g() pure returns (bool) { return true; }
==== Source: s2.sol ====
import {f as g, g as g} from "s1.sol";
contract C {
function foo() public pure returns (uint, bool) {
return (g(2), g());
}
}
// ----
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
library L {
struct S { int a; }
enum State { idle, running, blocked }
}

contract D {
struct X { uint b; }
enum Color { red, green, blue }
}

contract C {
function f() pure public {
abi.decode("", (L.S));
abi.decode("", (L.State));
abi.decode("", (D.X));
abi.decode("", (D.Color));
}
}
// ----
2 changes: 1 addition & 1 deletion test/libsolidity/util/TestFileParserTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -798,7 +798,7 @@ BOOST_AUTO_TEST_CASE(call_arguments_tuple_invalid_empty)
BOOST_REQUIRE_THROW(parse(source), TestParserError);
}

BOOST_AUTO_TEST_CASE(call_arguments_tuple_invalid_parantheses)
BOOST_AUTO_TEST_CASE(call_arguments_tuple_invalid_parentheses)
{
char const* source = R"(
// f((uint8,() -> FAILURE
Expand Down