Skip to content

Commit 99f73fa

Browse files
Split defUnfolder asserts
1 parent 547a244 commit 99f73fa

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

compiler/src/dotty/tools/dotc/core/Normalize.scala

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,10 @@ private final class NormalizeMap(implicit ctx: Context) extends TypeMap {
136136
* error otherwise.
137137
*/
138138
private def defUnfolder(fnSym: Symbol): Unfolder = {
139-
assert(fnSym.isTerm && fnSym.isDependentMethod && fnSym.hasAnnotation(defn.BodyAnnot), s"Tried to illegally unfold $fnSym with flags")
139+
assert(fnSym.isTerm, s"Tried to illegally unfold $fnSym which is not a term")
140+
assert(fnSym.isDependentMethod, s"Tried to illegally unfold non dependent method $fnSym")
141+
assert(fnSym.hasAnnotation(defn.BodyAnnot), s"Tried to illegally unfold $fnSym with no body annotation")
142+
140143
val body: Tree = fnSym.getAnnotation(defn.BodyAnnot) match {
141144
case Some(annot) =>
142145
if (annot.isEvaluating)

0 commit comments

Comments
 (0)