Yul syntax tests showing broken behavior

This commit is contained in:
Kamil Śliwak 2021-09-21 13:36:23 +02:00
parent 5a7fddbd1f
commit 84ca67c283
4 changed files with 37 additions and 0 deletions

View File

@ -0,0 +1,9 @@
/// @use-src 0:"input.sol"
object "C" {
code {
/// @src 0:0:0
calldataload(0)
}
}
// ----
// TypeError 3083: (0-0): Top-level expressions are not supposed to return values (this expression returns 1 value). Use ``pop()`` or assign them.

View File

@ -0,0 +1,9 @@
/// @use-src 0:"input.sol"
object "C" {
code {
1
}
}
// ----
// ParserError 6913: Call or assignment expected.
// ParserError 2314: (67-68): Expected end of source but got '}'

View File

@ -0,0 +1,8 @@
/// @use-src 0:"input.sol"
object "C" {
code {
let x, y := 1
}
}
// ----
// DeclarationError 3812: Variable count mismatch for declaration of "x, y": 2 variables and 1 values.

View File

@ -0,0 +1,11 @@
/// @use-src 0:"input.sol"
object "C" {
code {
/// @src 0:0:0
function g() {
function g() {}
}
}
}
// ----
// DeclarationError 6052: (0-0): Function name g already taken in this scope.