Fix infinite loop when accessing circular constants from inline assembly.

This commit is contained in:
hrkrshnn
2021-01-26 09:22:05 +01:00
committed by chriseth
parent 9fc3d88617
commit ec57c791ef
7 changed files with 85 additions and 0 deletions
@@ -0,0 +1,17 @@
==== Source: a ====
import "b";
uint constant c = d;
==== Source: b ====
import "a" as M;
uint constant b = M.c;
uint constant d = b;
contract C {
uint constant a = b;
function f() public returns (uint t) {
assembly {
t := a
}
}
}
// ----
// TypeError 3558: (b:178-179): Constant variable is circular.