Merge pull request #7743 from ethereum/fixice-7558

Disallow conversion from ``super``
This commit is contained in:
chriseth
2019-11-19 18:52:33 +01:00
committed by GitHub
4 changed files with 26 additions and 0 deletions
@@ -0,0 +1,15 @@
contract S
{
int o;
function foo() public returns (int) { return o = 3; }
}
contract B is S
{
function fii() public
{
o = S(super).foo();
}
}
// ----
// TypeError: (129-137): Explicit type conversion not allowed from "contract super B" to "contract S".