2020-06-23 12:14:24 +00:00
|
|
|
contract A1 { constructor() {} }
|
2020-05-06 15:21:44 +00:00
|
|
|
contract B1 is A1 {}
|
|
|
|
|
2020-06-23 12:14:24 +00:00
|
|
|
contract A2 { constructor() payable {} }
|
2020-05-06 15:21:44 +00:00
|
|
|
contract B2 is A2 {}
|
|
|
|
|
|
|
|
contract B3 {}
|
|
|
|
|
2020-06-23 12:14:24 +00:00
|
|
|
contract B4 { constructor() {} }
|
2020-05-06 15:21:44 +00:00
|
|
|
|
|
|
|
contract C {
|
|
|
|
function f() public payable {
|
|
|
|
new B1{value: 10}();
|
|
|
|
new B2{value: 10}();
|
|
|
|
new B3{value: 10}();
|
|
|
|
new B4{value: 10}();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// ----
|
2020-06-23 12:14:24 +00:00
|
|
|
// TypeError 7006: (214-231): Cannot set option "value", since the constructor of contract B1 is not payable.
|
|
|
|
// TypeError 7006: (237-254): Cannot set option "value", since the constructor of contract B2 is not payable.
|
|
|
|
// TypeError 7006: (260-277): Cannot set option "value", since the constructor of contract B3 is not payable.
|
|
|
|
// TypeError 7006: (283-300): Cannot set option "value", since the constructor of contract B4 is not payable.
|