Skip to content

Commit 49947f9

Browse files
committed
SuspendException: Do not compute the stack trace since we never use it
1 parent 108a3c6 commit 49947f9

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

compiler/src/dotty/tools/dotc/CompilationUnit.scala

+2-1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import core.Decorators._
1616
import config.{SourceVersion, Feature}
1717
import StdNames.nme
1818
import scala.annotation.internal.sharable
19+
import scala.util.control.NoStackTrace
1920
import transform.MacroAnnotations
2021

2122
class CompilationUnit protected (val source: SourceFile) {
@@ -105,7 +106,7 @@ class CompilationUnit protected (val source: SourceFile) {
105106

106107
object CompilationUnit {
107108

108-
class SuspendException extends Exception
109+
class SuspendException extends Exception with NoStackTrace
109110

110111
/** Make a compilation unit for top class `clsd` with the contents of the `unpickled` tree */
111112
def apply(clsd: ClassDenotation, unpickled: Tree, forceTrees: Boolean)(using Context): CompilationUnit =

0 commit comments

Comments
 (0)