Add syntax test for location specifier redeclarations

This commit is contained in:
Alex Beregszaszi 2018-07-24 20:10:03 +01:00
parent 008eb1c2c9
commit fa68e0019f
3 changed files with 23 additions and 0 deletions

View File

@ -0,0 +1,12 @@
contract Foo {
uint[] m_x;
function f() public view {
uint[] storage memory x = m_x;
uint[] memory storage calldata y;
x; y;
}
}
// ----
// ParserError: (85-91): Location already specified.
// ParserError: (123-130): Location already specified.
// ParserError: (131-139): Location already specified.

View File

@ -0,0 +1,6 @@
contract Foo {
function f(uint[] storage memory constant x, uint[] memory calldata y) internal { }
}
// ----
// ParserError: (45-51): Location already specified.
// ParserError: (78-86): Location already specified.

View File

@ -0,0 +1,5 @@
contract Foo {
uint[] memory storage calldata x;
}
// ----
// ParserError: (23-29): Expected identifier but got 'memory'