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

Unlikely to occur -- Using ChangeType with escaped names will result in correct types. #502

Open
traceyyoshima opened this issue Dec 4, 2023 · 0 comments
Labels
bug Something isn't working priority:low

Comments

@traceyyoshima
Copy link
Contributor

This likely applies to any recipe that updates a name that is escapable such as ChangeMethodName.

    @Test
    void changeToEscapedImport() {
        rewriteRun(
          spec -> spec.recipe(new ChangeType("a.b.Original", "x.y.`Target`", true)),
          kotlin(
            """
              package a.b
              class Original
              """),
          kotlin(
            """
              import a.b.Original
              
              class A {
                  val type : Original = Original()
              }
              """,
            """
              import x.y.`Target`
              
              class A {
                  val type : `Target` = `Target`()
              }
              """
          )
        );
    }
@traceyyoshima traceyyoshima added the bug Something isn't working label Dec 4, 2023
@traceyyoshima traceyyoshima moved this to Backlog in OpenRewrite Dec 4, 2023
@traceyyoshima traceyyoshima changed the title Using ChangeType with escaped names will result in correct types. Priority: Low, Unlikely to occur -- Using ChangeType with escaped names will result in correct types. Dec 20, 2023
@traceyyoshima traceyyoshima changed the title Priority: Low, Unlikely to occur -- Using ChangeType with escaped names will result in correct types. Unlikely to occur -- Using ChangeType with escaped names will result in correct types. Dec 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working priority:low
Projects
Status: Backlog
Development

No branches or pull requests

1 participant