mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Add syntax test for location specifier redeclarations
This commit is contained in:
parent
008eb1c2c9
commit
fa68e0019f
@ -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.
|
@ -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.
|
@ -0,0 +1,5 @@
|
||||
contract Foo {
|
||||
uint[] memory storage calldata x;
|
||||
}
|
||||
// ----
|
||||
// ParserError: (23-29): Expected identifier but got 'memory'
|
Loading…
Reference in New Issue
Block a user