mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Merge pull request #9492 from ethereum/someValueTests
Some more tests for value.
This commit is contained in:
commit
7ff3d10fee
@ -0,0 +1,11 @@
|
|||||||
|
contract C {
|
||||||
|
constructor() {}
|
||||||
|
}
|
||||||
|
contract D {
|
||||||
|
function createC() public returns (C) {
|
||||||
|
C c = (new C).value(2)();
|
||||||
|
return c;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// ----
|
||||||
|
// TypeError 8827: (107-120): Constructor for contract C must be payable for member "value" to be available.
|
@ -0,0 +1,8 @@
|
|||||||
|
library L { function l() public {} }
|
||||||
|
contract test {
|
||||||
|
function f() public {
|
||||||
|
L.l{value: 1}();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// ----
|
||||||
|
// TypeError 2193: (87-100): Function call options can only be set on external function calls or contract creations.
|
Loading…
Reference in New Issue
Block a user