Update expectation in tests for inline assembly with name clashes

This commit is contained in:
Kamil Śliwak
2021-10-27 20:16:32 +02:00
parent 8c6e5e501b
commit 910ea59ace
7 changed files with 35 additions and 205 deletions
@@ -0,0 +1,11 @@
contract C {
function f() public pure returns (uint r) {
assembly { function f() -> x { x := 1 } r := f() }
}
function g() public pure returns (uint r) {
assembly { function f() -> x { x := 2 } r := f() }
}
}
// ----
// DeclarationError 3859: (80-108): This declaration shadows a declaration outside the inline assembly block.
// DeclarationError 3859: (193-221): This declaration shadows a declaration outside the inline assembly block.
@@ -0,0 +1,24 @@
contract C {
uint y;
modifier m() {
uint t;
assembly {
function f() -> x { x := 8 }
t := f()
}
y = t;
_;
}
function f() m m public returns (uint r) {
assembly { function f() -> x { x := 1 } r := f() }
}
function g() m m public returns (uint r) {
assembly { function f() -> x { x := 2 } r := f() }
}
}
// ----
// DeclarationError 3859: (92-120): This declaration shadows a declaration outside the inline assembly block.
// DeclarationError 3859: (251-279): This declaration shadows a declaration outside the inline assembly block.
// DeclarationError 3859: (363-391): This declaration shadows a declaration outside the inline assembly block.