Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x/tools/gopls/internal/analysis/modernize: incomplete simplification in appendclipped #71296

Open
adonovan opened this issue Jan 16, 2025 · 0 comments
Labels
BugReport Issues describing a possible bug in the Go implementation. gopls Issues related to the Go language server, gopls. Refactoring Issues related to refactoring tools Tools This label describes issues relating to any tools in the x/tools repository.
Milestone

Comments

@adonovan
Copy link
Member

adonovan commented Jan 16, 2025

The appendclipped modernizer has an existing test case whose output (after applying a fix) is:

	print(slices.Concat(other[:len(other):len(other)], s, other))      // want "Replace append with slices.Concat"

The first argument should also have been simplified to other. Investigate + fix.

@adonovan adonovan added gopls Issues related to the Go language server, gopls. Refactoring Issues related to refactoring tools labels Jan 16, 2025
@adonovan adonovan added this to the gopls/v0.18.0 milestone Jan 16, 2025
@gabyhelp gabyhelp added the BugReport Issues describing a possible bug in the Go implementation. label Jan 16, 2025
@seankhliao seankhliao changed the title gopls/internal/analysis/modernize: incomplete simplification in appendclipped x/tools/gopls/internal/analysis/modernize: incomplete simplification in appendclipped Jan 16, 2025
@gopherbot gopherbot added the Tools This label describes issues relating to any tools in the x/tools repository. label Jan 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BugReport Issues describing a possible bug in the Go implementation. gopls Issues related to the Go language server, gopls. Refactoring Issues related to refactoring tools Tools This label describes issues relating to any tools in the x/tools repository.
Projects
None yet
Development

No branches or pull requests

3 participants