File tree 2 files changed +7
-6
lines changed
staging/src/scala/quoted/staging
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:
56
56
try method.invoke(inst).asInstanceOf [T ]
57
57
catch case ex : java.lang.reflect.InvocationTargetException =>
58
58
ex.getCause match
59
- case ex : java.lang.NoClassDefFoundError =>
59
+ case _ : java.lang.NoClassDefFoundError =>
60
60
throw new Exception (
61
61
s """ `scala.quoted.staging.run` failed to load a class.
62
62
|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)
8
8
def f (i : Expr [Int ])(using Quotes ): Expr [A ] = { ' { new A ($i) } }
9
9
10
10
@ 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())
16
17
}
You can’t perform that action at this time.
0 commit comments