Skip to content

x/tools/internal/refactor/inline: compute minimum version from callee code #75726

@adonovan

Description

@adonovan

When inlining a call from one file to another, it's possible that the callee uses a newer feature of the Go spec or library than the caller, causing inlining to break the caller. The tool should compute the minimum language version implied by the callee function body (e.g. by checking each std symbol it references, or whether it uses a feature such as new(expr)) and refuse to inline if the caller is older than that.

This could be quite tricky in the general case.

Metadata

Metadata

Assignees

No one assigned

    Labels

    FeatureRequestIssues asking for a new feature that does not need a proposal.NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.RefactoringIssues related to refactoring toolsToolsThis label describes issues relating to any tools in the x/tools repository.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions