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,14 @@
==== Source: a ====
bytes32 constant x = x;
==== Source: b ====
import "a";
contract C {
function f() public pure returns (uint t) {
assembly {
// Reference to a circular member
t := x
}
}
}
// ----
// TypeError 3558: (b:155-156): Constant variable is circular.