negative_exponent.sol 412 B

123456789101112131415
  1. contract c {
  2. function f() public pure returns (uint) {
  3. return 5e-2 + 1.95;
  4. }
  5. function g() public pure returns (uint) {
  6. return 200e-2 wei;
  7. }
  8. function h() public pure returns (uint) {
  9. return 5e-2 + 1.96;
  10. }
  11. }
  12. // ---- Expect: diagnostics ----
  13. // warning: 6:16-26: ethereum currency unit used while targeting Solana
  14. // error: 9:2-20: conversion to uint256 from rational not allowed