Disallow conversion from `super`

This commit is contained in:
Mathias Baumann
2019-11-19 17:14:11 +01:00
parent f6191a7183
commit 23cad71c88
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".