Skip to content

Refactorer can behave badly when there are compiler errors #1635

@randomPoison

Description

@randomPoison

Something I ran into while working on removing unused unsafe blocks in #1611 is that the compiler's unused-unsafe analysis produces incorrect results when there's a compiler error in the starting code. In that case, the unused-unsafe analysis would incorrectly mark all unsafe blocks as unused, causing the transform to remove the unsafe keyword in cases where it was still necessary. For that transform I added a check that skips the transform if there are errors, but it was also suggested that we cancel the refactorer run entirely if there are errors. It's unclear to me if this is an issue that effects other transforms, but disallowing running the refactorer when there are errors seems like a reasonable thing to do.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingrefactorerThis issue relates to the refactoring tool

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions