Disallow modifier declarations and definitions in interfaces

This commit is contained in:
Kamil Śliwak
2021-08-31 15:25:08 +02:00
committed by Marenz
parent 13691dfbaa
commit d07b796675
11 changed files with 71 additions and 12 deletions
+3 -1
View File
@@ -6,12 +6,14 @@
Interfaces
**********
Interfaces are similar to abstract contracts, but they cannot have any functions implemented. There are further restrictions:
Interfaces are similar to abstract contracts, but they cannot have any functions implemented.
There are further restrictions:
- They cannot inherit from other contracts, but they can inherit from other interfaces.
- All declared functions must be external.
- They cannot declare a constructor.
- They cannot declare state variables.
- They cannot declare modifiers.
Some of these restrictions might be lifted in the future.