2019-11-05 17:25:34 +00:00
|
|
|
abstract contract A {
|
|
|
|
function test() external virtual returns (uint256);
|
2019-12-02 20:39:53 +00:00
|
|
|
function test2() external returns (uint256) {}
|
2019-11-05 17:25:34 +00:00
|
|
|
}
|
|
|
|
abstract contract X is A {
|
2019-12-02 20:39:53 +00:00
|
|
|
function test() external returns (uint256) {}
|
|
|
|
function test2() external override(A) returns (uint256) {}
|
2019-11-05 17:25:34 +00:00
|
|
|
}
|
|
|
|
// ----
|
2019-12-09 16:51:53 +00:00
|
|
|
// TypeError: (153-198): Overriding function is missing "override" specifier.
|
2019-12-02 20:39:53 +00:00
|
|
|
// TypeError: (76-122): Trying to override non-virtual function. Did you forget to add "virtual"?
|