File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
compiler/src/dotty/tools/dotc/interactive Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -119,10 +119,14 @@ class InteractiveDriver(val settings: List[String]) extends Driver {
119
119
120
120
private val (zipClassPaths, dirClassPaths) = currentCtx.platform.classPath(currentCtx) match {
121
121
case AggregateClassPath (cps) =>
122
- val (zipCps, dirCps) = cps.partition(_.isInstanceOf [ZipArchiveFileLookup [_]])
123
- // This will be wrong if any other subclass of ClassPath is either used,
124
- // like `JrtClassPath` once we get Java 9 support
125
- (zipCps.asInstanceOf [Seq [ZipArchiveFileLookup [_]]], dirCps.asInstanceOf [Seq [JFileDirectoryLookup [_]]])
122
+ // FIXME: We shouldn't assume that ClassPath doesn't have other
123
+ // subclasses. For now, the only other subclass is JrtClassPath on Java
124
+ // 9+, we can safely ignore it for now because it's only used for the
125
+ // standard Java library, but this will change once we start supporting
126
+ // adding entries to the modulepath.
127
+ val zipCps = cps.collect { case cp : ZipArchiveFileLookup [_] => cp }
128
+ val dirCps = cps.collect { case cp : JFileDirectoryLookup [_] => cp }
129
+ (zipCps, dirCps)
126
130
case _ =>
127
131
(Seq (), Seq ())
128
132
}
You can’t perform that action at this time.
0 commit comments