| 1 |
package generatedcode |
| 2 |
|
| 3 |
// This file does not have the generated code comment. |
| 4 |
// It exists to ensure that generated code is considered |
| 5 |
// when determining whether or not function parameters |
| 6 |
// are used. |
| 7 |
|
| 8 |
type implementsGeneratedInterface struct{} |
| 9 |
|
| 10 |
// The f parameter should not be reported as unused, |
| 11 |
// because this method implements the parent interface defined |
| 12 |
// in the generated code. |
| 13 |
func (implementsGeneratedInterface) n(f bool) { |
| 14 |
// The body must not be empty, otherwise unusedparams will |
| 15 |
// not report the unused parameter regardless of the |
| 16 |
// interface. |
| 17 |
println() |
| 18 |
} |
| 19 |
|
| 20 |
func b(_ bool) { println() } // want "unused parameter: x" |