mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Extract yul syntax tests: if statement
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
{
|
||||
if true:bool {}
|
||||
}
|
||||
// ====
|
||||
// dialect: evmTyped
|
||||
// ----
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
if false:bool
|
||||
{
|
||||
let x:u256 := 3:u256
|
||||
}
|
||||
}
|
||||
// ====
|
||||
// dialect: evmTyped
|
||||
// ----
|
||||
@@ -0,0 +1,11 @@
|
||||
{
|
||||
function f() -> x:bool {}
|
||||
|
||||
if f()
|
||||
{
|
||||
let b:bool := f()
|
||||
}
|
||||
}
|
||||
// ====
|
||||
// dialect: evmTyped
|
||||
// ----
|
||||
@@ -0,0 +1,5 @@
|
||||
{ if let x:u256 {} }
|
||||
// ====
|
||||
// dialect: evmTyped
|
||||
// ----
|
||||
// ParserError 1856: (5-8): Literal or identifier expected.
|
||||
@@ -0,0 +1,5 @@
|
||||
{ if true:bool let x:u256 := 3:u256 }
|
||||
// ====
|
||||
// dialect: evmTyped
|
||||
// ----
|
||||
// ParserError 2314: (15-18): Expected '{' but got reserved keyword 'let'
|
||||
@@ -0,0 +1,5 @@
|
||||
{ if 42:u256 { } }
|
||||
// ====
|
||||
// dialect: evmTyped
|
||||
// ----
|
||||
// TypeError 1733: (5-12): Expected a value of boolean type "bool" but got "u256"
|
||||
Reference in New Issue
Block a user