import_free_function.sol 375 B

1234567891011121314
  1. // ensure free function can be imported (plain, renamed, import symbol)
  2. import "./for_if_no_else.sol";
  3. import {foo as renamed_foo} from "./for_if_no_else.sol";
  4. import * as X from "./for_if_no_else.sol";
  5. function bar() {
  6. int x = foo();
  7. x = renamed_foo();
  8. x = X.foo();
  9. x = X.foo({});
  10. }
  11. // ---- Expect: diagnostics ----
  12. // warning: 1:1-29: function can be declared 'pure'