Skip to content

_ does not work in string interpolator #17698

@scf37

Description

@scf37

Compiler version

3.1.3

Minimized code

Seq(1, 2, 3).map(s"$_ ")

Output

error in interpolated string: identifier, `this' or block expected

Expectation

Successful compilation

Seq(1, 2, 3).map(s"${_} ") yields different error:
Unbound placeholder parameter; incorrect use of _

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