Skip to content

Renaming variable is not possible from -spec attribute #121

@robertoaloi

Description

@robertoaloi

Describe the bug

While it's possible to rename a variable via the a textDocument/rename request in the context of a function, this is not possible from a -spec attribute.

To Reproduce**

Have code such as:

-spec handle_cast(Request, state()) -> Result when
    Request :: cast_request(),
    Result :: {noreply, state()} | {stop, shutdown, state()}.
handle_cast(_, _State) ->
    error(not_implemented).

Expected behavior

Put the cursor over Request, press F2 (or the equivalent shortcut for renaming), rename to Message and have all occurrences in the spec changed.

Actual behavior

The rename operation fails with an error

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions