Skip to content

Invalid file name for class files on Windows #7492

Closed
@liufengyun

Description

@liufengyun

minimized code

Given the following code:

class A  {
  given (self: Int) {
    def =:(x: Int) = ???
    def f: Int = ???
  }
}

Dotty generates a class file A$given_=:_of_Int$.class, which is invalid on Windows, as : is not allowed in file names.

A walkaround is to switch the order of the two methods.

expectation

Dotty should not generate the file name A$given_=:_of_Int$.class which depend on method names.

Thanks to @michelou for reporting the bug.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions