mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Tests for suffixes with reserved names that could otherwise cause ambiguities
This commit is contained in:
parent
a65a0233a3
commit
65d1ae5d48
@ -0,0 +1,7 @@
|
||||
function delete(uint) pure suffix returns (uint) {}
|
||||
|
||||
contract C {
|
||||
uint x = 1 delete;
|
||||
}
|
||||
// ----
|
||||
// ParserError 2314: (9-15): Expected identifier but got 'delete'
|
@ -0,0 +1,7 @@
|
||||
function hex(uint) pure suffix returns (bytes memory) {}
|
||||
|
||||
contract C {
|
||||
bytes b = 1 hex"1234";
|
||||
}
|
||||
// ----
|
||||
// ParserError 2314: (9-12): Expected identifier but got 'ILLEGAL'
|
@ -0,0 +1,7 @@
|
||||
function new(uint) pure suffix returns (uint) {}
|
||||
|
||||
contract C {
|
||||
uint x = 1 new;
|
||||
}
|
||||
// ----
|
||||
// ParserError 2314: (9-12): Expected identifier but got 'new'
|
Loading…
Reference in New Issue
Block a user