rewrite7.input 472 B

1234567891011121314151617
  1. //gofmt -r=fun(x...)->Fun(x)
  2. // Copyright 2013 The Go Authors. All rights reserved.
  3. // Use of this source code is governed by a BSD-style
  4. // license that can be found in the LICENSE file.
  5. // Rewriting of calls must take the ... (ellipsis)
  6. // attribute for the last argument into account.
  7. package p
  8. func fun(x []int) {}
  9. func g(x []int) {
  10. fun(x) // -r='fun(x...)->Fun(x)' should not rewrite this
  11. fun(x...) // -r='fun(x...)->Fun(x)' should rewrite this to Fun(x)
  12. }