File tree 1 file changed +5
-6
lines changed
compiler/src/dotty/tools/dotc/classpath 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -41,12 +41,11 @@ case class VirtualDirectoryClassPath(dir: VirtualDirectory) extends ClassPath wi
41
41
override def findClass (className : String ): Option [ClassRepresentation ] = findClassFile(className) map ClassFileEntryImpl .apply
42
42
43
43
def findClassFile (className : String ): Option [AbstractFile ] = {
44
- val pathSeq = FileUtils .dirPath(className).split(java.io.File .separator).toVector
45
- val parentSeq = pathSeq.init
46
- val tastyPath = parentSeq :+ (pathSeq.last + " .tasty" )
47
- val classPath = parentSeq :+ (pathSeq.last + " .class" )
48
- Option (lookupPath(dir)(tastyPath, directory = false ))
49
- .orElse(Option (lookupPath(dir)(classPath, directory = false )))
44
+ val pathSeq = FileUtils .dirPath(className).split(java.io.File .separator)
45
+ val parentDir = lookupPath(dir)(pathSeq.init.toSeq, directory = true )
46
+ val name = pathSeq.last
47
+ Option (lookupPath(parentDir)(name + " .tasty" :: Nil , directory = false ))
48
+ .orElse(Option (lookupPath(parentDir)(name + " .class" :: Nil , directory = false )))
50
49
}
51
50
52
51
private [dotty] def classes (inPackage : PackageName ): Seq [ClassFileEntry ] = files(inPackage)
You can’t perform that action at this time.
0 commit comments