mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Disallow conversion from `super`
This commit is contained in:
@@ -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".
|
||||
Reference in New Issue
Block a user