Skip to content

Commit a53939c

Browse files
committed
Remove outdated comment
1 parent 77632ce commit a53939c

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

compiler/src/dotty/tools/dotc/transform/Splicer.scala

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -324,20 +324,18 @@ object Splicer {
324324
try classLoader.loadClass(name)
325325
catch {
326326
case _: ClassNotFoundException =>
327-
val msg = s"Could not find class $name in classpath$extraMsg"
327+
val msg = s"Could not find class $name in classpath"
328328
throw new StopInterpretation(msg, pos)
329329
}
330330

331331
private def getMethod(clazz: Class[?], name: Name, paramClasses: List[Class[?]]): Method =
332332
try clazz.getMethod(name.toString, paramClasses: _*)
333333
catch {
334334
case _: NoSuchMethodException =>
335-
val msg = em"Could not find method ${clazz.getCanonicalName}.$name with parameters ($paramClasses%, %)$extraMsg"
335+
val msg = em"Could not find method ${clazz.getCanonicalName}.$name with parameters ($paramClasses%, %)"
336336
throw new StopInterpretation(msg, pos)
337337
}
338338

339-
private def extraMsg = ". The most common reason for that is that you apply macros in the compilation run that defines them"
340-
341339
private def stopIfRuntimeException[T](thunk: => T, method: Method): T =
342340
try thunk
343341
catch {
@@ -351,7 +349,7 @@ object Splicer {
351349
throw new StopInterpretation(sw.toString, pos)
352350
case ex: InvocationTargetException =>
353351
ex.getTargetException match {
354-
case ClassDefinedInCurrentRun(sym) =>
352+
case MissingClassDefinedInCurrentRun(sym) =>
355353
if (ctx.settings.XprintSuspension.value)
356354
ctx.echo(i"suspension triggered by a dependency on $sym", pos)
357355
ctx.compilationUnit.suspend() // this throws a SuspendException
@@ -371,7 +369,7 @@ object Splicer {
371369
}
372370
}
373371

374-
private object ClassDefinedInCurrentRun {
372+
private object MissingClassDefinedInCurrentRun {
375373
def unapply(targetException: NoClassDefFoundError)(given ctx: Context): Option[Symbol] = {
376374
val className = targetException.getMessage
377375
val sym = ctx.base.staticRef(className.toTypeName).symbol

0 commit comments

Comments
 (0)