File tree Expand file tree Collapse file tree 2 files changed +7
-6
lines changed
staging/src/scala/quoted/staging Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -56,7 +56,7 @@ private class QuoteDriver(appClassloader: ClassLoader) extends Driver:
5656 try method.invoke(inst).asInstanceOf [T ]
5757 catch case ex : java.lang.reflect.InvocationTargetException =>
5858 ex.getCause match
59- case ex : java.lang.NoClassDefFoundError =>
59+ case _ : java.lang.NoClassDefFoundError =>
6060 throw new Exception (
6161 s """ `scala.quoted.staging.run` failed to load a class.
6262 |The classloader used for the `staging.Compiler` instance might not be the correct one.
Original file line number Diff line number Diff line change @@ -8,9 +8,10 @@ class A(i: Int)
88def f (i : Expr [Int ])(using Quotes ): Expr [A ] = { ' { new A ($i) } }
99
1010@ main def Test = {
11- try
12- val g : Int => A = staging.run { ' { (i : Int ) => $ { f(' {i}) } } }
13- println(g(3 ))
14- catch case ex : Exception =>
15- assert(ex.getMessage().startsWith(" `scala.quoted.staging.run` failed to load a class." ))
11+ if ! System .getProperty(" os.name" ).contains(" Windows" ) then
12+ try
13+ val g : Int => A = staging.run { ' { (i : Int ) => $ { f(' {i}) } } }
14+ println(g(3 ))
15+ catch case ex : Exception =>
16+ assert(ex.getMessage().startsWith(" `scala.quoted.staging.run` failed to load a class." ), ex.getMessage())
1617}
You can’t perform that action at this time.
0 commit comments