Skip to content

Commit

Permalink
Make error message talk about Module instead of Cacher (#20)
Browse files Browse the repository at this point in the history
  • Loading branch information
lihaoyi authored Oct 28, 2024
2 parents 33a27d4 + acdc535 commit 4aff772
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion moduledefs/src-2/Cacher.scala
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ object Cacher {
if (ownerIsCacherClass && owner.isMethod) q"this.cachedTarget[${weakTypeTag[R]}]($t)"
else c.abort(
c.enclosingPosition,
"Task{} members must be defs defined in a Cacher class/trait/object body"
"Task{} members must be defs defined in a Module class/trait/object body"
)
}
}
2 changes: 1 addition & 1 deletion moduledefs/src-3/Cacher.scala
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ object Cacher {
val thisSel = This(owner.owner).asExprOf[Cacher]
'{ $thisSel.cachedTarget[T](${ t })(using $enclosingCtx) }
} else report.errorAndAbort(
"Task{} members must be defs defined in a Cacher class/trait/object body",
"Task{} members must be defs defined in a Module class/trait/object body",
Position.ofMacroExpansion
)
}
Expand Down

0 comments on commit 4aff772

Please sign in to comment.