Skip to content

Decompilation tests sometimes cannot be compiled on Windows due to unicode escapes in comments #5414

Closed
@smarter

Description

@smarter

As reported on Gitter by @michelou, the decompilation tests fail on Windows:

-- Error: C:\dotty\out\posTestFromTasty\pos_decompiled\clsrefine\decompiled.scala:28:63 -
28 |/** Decompiled from out\posTestFromTasty\pos\clsrefine\scalac\util\test.class */
   |                                                               ^
   |                                                               error in unicode escape

It's very weird, but Scala will try to interpret a unicode escape \uXXXX when it sees it in a comment. And since Windows paths are separated using \, this means we run into trouble as soon as a directory name starts with u. We can avoid this issue by always using / when printing filenames in comments, even on Windows.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions