mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Add more denomination tests
This commit is contained in:
parent
6d26ad1e61
commit
75faed7c55
@ -0,0 +1,5 @@
|
||||
contract C {
|
||||
uint constant a = 1 wei + 2 szabo + 3 finney + 4 ether;
|
||||
uint constant b = 1 seconds + 2 minutes + 3 hours + 4 days + 5 weeks + 6 years;
|
||||
uint constant c = 2 szabo / 1 seconds + 3 finney * 3 hours;
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
contract C {
|
||||
uint constant a = 4 ether / 3 hours;
|
||||
ufixed constant b = ufixed(4 ether / 3 hours);
|
||||
}
|
||||
// ----
|
||||
// TypeError: (32-49): Type rational_const 10000000000000000 / 27 is not implicitly convertible to expected type uint256. Try converting to type ufixed256x62 or use an explicit conversion.
|
Loading…
Reference in New Issue
Block a user