Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make error message talk about Module instead of Cacher #20

Merged
merged 2 commits into from
Oct 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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