Skip to content

Commit 39c69c2

Browse files
Merge pull request #4664 from dotty-staging/fix/YthroughTasty
Fix -Ythrough-tasty
2 parents 76b110b + bde19ec commit 39c69c2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

compiler/src/dotty/tools/dotc/fromtasty/Debug.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,11 @@ object Debug {
3535

3636
val fromTastyOut = Files.createDirectory(tmpOut.resolve("from-tasty"))
3737

38-
val ext = "hasTasty"
39-
val classes = Directory(fromSourcesOut).walk.filter(x => x.isFile && x.extension == ext).map { x =>
38+
val extensions = List("tasty", "hasTasty").map(_.toLowerCase)
39+
val classes = Directory(fromSourcesOut).walk.filter(x => x.isFile && extensions.exists(_ == x.extension.toLowerCase)).map { x =>
4040
val source = x.toString
4141
// transform foo/bar/Baz.hasTasty into foo.bar.Baz
42-
source.substring(fromSourcesOut.toString.length + 1, source.length - ext.length - 1).replace('/', '.')
42+
source.substring(fromSourcesOut.toString.length + 1, source.length - x.extension.length - 1).replace('/', '.')
4343
}.toList
4444

4545
val fromTastyArgs = {

0 commit comments

Comments
 (0)