Disallow the same yul variable occurring multiple times on the LHS of an assignment.

This commit is contained in:
Daniel Kirchner
2020-07-07 10:52:47 +02:00
parent 375cb09341
commit 70615a73a4
5 changed files with 32 additions and 0 deletions
@@ -0,0 +1,10 @@
{
function f() -> a, b {}
function g() -> a, b, c {}
let x, y
x, x := f()
y, x, y := g()
}
// ----
// DeclarationError 9005: (70-81): Variable x occurs multiple times on the left-hand side of the assignment.
// DeclarationError 9005: (84-98): Variable y occurs multiple times on the left-hand side of the assignment.
@@ -0,0 +1,6 @@
{
function f() -> a, b {}
let x, x := f()
}
// ----
// DeclarationError 1395: (30-45): Variable name x already taken in this scope.