Skip to content
This repository was archived by the owner on Jan 12, 2024. It is now read-only.
This repository was archived by the owner on Jan 12, 2024. It is now read-only.

Renaming a callable or type breaks qualified references #612

Open
@bamarsha

Description

@bamarsha

Describe the bug

Renaming a callable or type using the "rename symbol" command in VS Code does not preserve qualified names in references to the symbol, causing "no identifier exists" errors.

To Reproduce

namespace Example1 {
    newtype Foo = Unit;

    operation Bar() : Unit { }
}

namespace Example2 {
    operation Baz() : Example1.Foo {
        Example1.Bar();
        return Example1.Foo();
    }
}

Use "rename symbol" to rename Foo and Bar. The output is:

namespace Example1 {
    newtype NewFoo = Unit;

    operation NewBar() : Unit { }
}

namespace Example2 {
    operation Baz() : NewFoo {
        NewBar();
        return NewFoo();
    }
}

which does not compile.

Expected behavior

The output should be:

namespace Example1 {
    newtype NewFoo = Unit;

    operation NewBar() : Unit { }
}

namespace Example2 {
    operation Baz() : Example1.NewFoo {
        Example1.NewBar();
        return Example1.NewFoo();
    }
}

System information

  • VS Code extension v0.12.20082513
  • Windows 10, .NET Core 3.1.401
  • VS Code 1.48.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: editorExtensions for Visual Studio and Visual Studio CodebugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions