aboutsummaryrefslogtreecommitdiffstats
path: root/test/libsolidity/syntaxTests/inheritance/override
diff options
context:
space:
mode:
Diffstat (limited to 'test/libsolidity/syntaxTests/inheritance/override')
-rw-r--r--test/libsolidity/syntaxTests/inheritance/override/change_return_types_in_interface.sol10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/libsolidity/syntaxTests/inheritance/override/change_return_types_in_interface.sol b/test/libsolidity/syntaxTests/inheritance/override/change_return_types_in_interface.sol
new file mode 100644
index 00000000..804a1810
--- /dev/null
+++ b/test/libsolidity/syntaxTests/inheritance/override/change_return_types_in_interface.sol
@@ -0,0 +1,10 @@
+interface I {
+ function f() external pure returns (uint);
+}
+contract B is I {
+ // The compiler used to have a bug where changing
+ // the return type was fine in this situation.
+ function f() public pure returns (uint, uint) {}
+}
+// ----
+// TypeError: (182-230): Overriding function return types differ.