Make visibility optional, but it has to be consistent.

This commit is contained in:
chriseth
2020-07-07 12:16:18 +02:00
parent 479d7a059f
commit 5959d442cb
13 changed files with 78 additions and 15 deletions
@@ -1,8 +1,8 @@
abstract contract C {
constructor() {}
contract C {
constructor() internal {}
}
contract D {
function f() public { C c = new C(); c; }
}
// ----
// TypeError 4614: (84-89): Cannot instantiate an abstract contract.
// DeclarationError 1845: (14-39): Non-abstract contracts cannot have internal constructors. Remove the "internal" keyword and make the contract abstract to fix this.