Skip to content

Incorrect handle of unicode escapes in triple-quoted string #11640

Closed
@lihaoyi

Description

@lihaoyi

Compiler version

3.0.0-RC1

Minimized code

object Bar{
  def main(args: Array[String]): Unit = {
    println(""""\\\uCAFE"""".getBytes.toList)
  }
}

Output

This is what it prints in 3.0.0-RC1

List(34, 92, 92, 92, 117, 67, 65, 70, 69, 34)

Expectation

This is what it prints in 2.13.4 and 2.12.13

List(34, 92, 92, -20, -85, -66, 34)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions