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

StringPlusAny triggers when interpolating strings #447

Open
Philippus opened this issue Apr 25, 2019 · 2 comments
Open

StringPlusAny triggers when interpolating strings #447

Philippus opened this issue Apr 25, 2019 · 2 comments

Comments

@Philippus
Copy link

@Philippus Philippus commented Apr 25, 2019

the following test passes on scala 2.12.8, but fails on scala 2.13.0-RC1

  test("string interpolation is allowed") {
    val b: Boolean = true
    val result = WartTestTraverser(StringPlusAny) {
      s"$b"
    }
    assertEmpty(result)
  }
@xuwei-k

This comment has been minimized.

Copy link
Collaborator

@xuwei-k xuwei-k commented Apr 30, 2019

related (or duplicate?) issues

@ClaireNeveu

This comment has been minimized.

Copy link
Collaborator

@ClaireNeveu ClaireNeveu commented Apr 30, 2019

It might make sense to just fold StringPlusAny into ToString to get a wart which consistently forbids s. I made them two different warts for historical reasons but I haven't seen a lot of people who want one but not the other.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
3 participants
You can’t perform that action at this time.