old_style_call_args.sol 646 B

12345678910111213141516171819202122
  1. contract c {
  2. function foo() public {
  3. d x = (new d).value(1).gas(2).foo(3)();
  4. }
  5. function bar() public {
  6. d x = new 1;
  7. }
  8. function baz() public {
  9. d x = new d;
  10. }
  11. }
  12. contract d {}
  13. // ---- Expect: diagnostics ----
  14. // error: 3:17-25: deprecated call argument syntax '.value(...)' is not supported, use '{value: ...}' instead
  15. // error: 3:26-32: deprecated call argument syntax '.gas(...)' is not supported, use '{gas: ...}' instead
  16. // error: 3:33-39: deprecated call argument syntax '.foo(...)' is not supported, use '{foo: ...}' instead
  17. // error: 7:13-14: type with arguments expected
  18. // error: 11:9-14: missing constructor arguments to d