mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Add tests showing hex literals are not allowed in Yul
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
contract C {
|
||||
function f() public pure {
|
||||
assembly {
|
||||
let x := hex"0011"
|
||||
}
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// ParserError 1856: (72-81): Literal or identifier expected.
|
||||
@@ -0,0 +1,9 @@
|
||||
contract C {
|
||||
function f() public pure {
|
||||
assembly {
|
||||
pop(hex"2233")
|
||||
}
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// ParserError 1856: (67-76): Literal or identifier expected.
|
||||
@@ -0,0 +1,11 @@
|
||||
contract C {
|
||||
function f() public pure {
|
||||
assembly {
|
||||
switch codesize()
|
||||
case hex"00" {}
|
||||
case hex"1122" {}
|
||||
}
|
||||
}
|
||||
}
|
||||
// ----
|
||||
// ParserError 1856: (92-99): Literal or identifier expected.
|
||||
Reference in New Issue
Block a user