Skip to content

-coverage-out fails to compile formatted string interpolation #15487

Closed
@arixmkii

Description

@arixmkii

Compiler version

3.2.0-RC1 with "-coverage-out:."

Minimized code

@main def main: Unit =
  println(hexMe(127))

def hexMe(i: Int): String =
  f"0x$i%016x"

Output

[error] 5 |  f"0x$i%016x"
[error]   |  ^^^^^^^^^^^^
[error]   |  Expected statically known StringContext
[error] one error found

Expectation

Code compiles

Metadata

Metadata

Labels

area:coverageCode coverage, see https://dotty.epfl.ch/docs/internals/coverage.htmlitype:bug

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions