File tree 3 files changed +12
-0
lines changed
compiler/src/dotty/tools/dotc/transform
3 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -422,6 +422,10 @@ object Splicer {
422
422
case _ : NoSuchMethodException =>
423
423
val msg = em " Could not find method ${clazz.getCanonicalName}. $name with parameters ( $paramClasses%, %) "
424
424
throw new StopInterpretation (msg, pos)
425
+ case MissingClassDefinedInCurrentRun (sym) if ctx.compilationUnit.isSuspendable =>
426
+ if (ctx.settings.XprintSuspension .value)
427
+ report.echo(i " suspension triggered by a dependency on $sym" , pos)
428
+ ctx.compilationUnit.suspend() // this throws a SuspendException
425
429
}
426
430
427
431
private def stopIfRuntimeException [T ](thunk : => T , method : JLRMethod ): T =
Original file line number Diff line number Diff line change
1
+ import scala .quoted .*
2
+ object Persistance :
3
+ inline def nameOf (inline e : Any ): String = $ { nameOfImpl(' e ) }
4
+ private def nameOfImpl (e : Expr [Any ])(using Quotes ): Expr [String ] = Expr (" " )
5
+ def foo (p : Versioned ): Unit = {}
Original file line number Diff line number Diff line change
1
+ // nopos-error
2
+ class Versioned :
3
+ def serialize : String = Persistance .nameOf(0 )
You can’t perform that action at this time.
0 commit comments