Skip to content

Commit 1390609

Browse files
authored
Merge pull request #15103 from philwalk/fix-for-13760
fix for #13760 - running script compiled jar no longer restricted to java.base module
2 parents 5a6f16a + 5f9b1cf commit 1390609

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

compiler/src/dotty/tools/runner/ScalaClassLoader.scala

+1-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ object ScalaClassLoader {
6767
@sharable private[this] val bootClassLoader: ClassLoader =
6868
if scala.util.Properties.isJavaAtLeast("9") then
6969
try
70-
MethodHandles.lookup().findStatic(classOf[ClassLoader], "getPlatformClassLoader", MethodType.methodType(classOf[ClassLoader])).invoke().asInstanceOf[ClassLoader]
70+
ClassLoader.getSystemClassLoader.getParent
7171
catch case _: Throwable => null
7272
else null
7373

compiler/test-resources/scripting/sqlDateError.sc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!bin/scala -nosave
1+
#!bin/scala
22

33
def main(args: Array[String]): Unit = {
44
println(new java.sql.Date(100L))

0 commit comments

Comments
 (0)