Skip to content

Commit d0d9717

Browse files
committed
Add auxilary constructor to repl.AbstractFileClassLoader to preserve source compatibilty
1 parent 40ed8d4 commit d0d9717

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

repl/src/dotty/tools/repl/AbstractFileClassLoader.scala

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ package repl
1515

1616
import scala.language.unsafeNulls
1717

18+
import dotty.tools.dotc.config.ScalaSettings
19+
1820
import io.AbstractFile
1921

2022
import java.net.{URL, URLConnection, URLStreamHandler}
@@ -23,6 +25,8 @@ import java.util.Collections
2325
class AbstractFileClassLoader(root: AbstractFile, parent: ClassLoader, interruptInstrumentation: String)
2426
extends io.AbstractFileClassLoader(root, parent):
2527

28+
def this(root: AbstractFile, parent: ClassLoader) = this(root, parent, ScalaSettings.XreplInterruptInstrumentation.default)
29+
2630
override def findClass(name: String): Class[?] = {
2731
var file: AbstractFile | Null = root
2832
val pathParts = name.split("[./]").toList

0 commit comments

Comments
 (0)