forked from ethereum/solidity
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
11 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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; | ||
} |
6 changes: 6 additions & 0 deletions
6
test/libsolidity/syntaxTests/denominations/fixed_point_division.sol
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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. |