File tree Expand file tree Collapse file tree 3 files changed +12
-0
lines changed
compiler/src/dotty/tools/dotc/transform Expand file tree Collapse file tree 3 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -422,6 +422,10 @@ object Splicer {
422422 case _ : NoSuchMethodException =>
423423 val msg = em " Could not find method ${clazz.getCanonicalName}. $name with parameters ( $paramClasses%, %) "
424424 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
425429 }
426430
427431 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