Improve config-creating macro error message

Fixes #130
This commit is contained in:
Dale Wijnand 2017-07-17 11:03:08 +01:00
parent 0147e0c775
commit c61a690109
No known key found for this signature in database
GPG Key ID: 4F256E3D151DF5EF
1 changed files with 1 additions and 1 deletions

View File

@ -109,7 +109,7 @@ private[sbt] object ConfigurationMacro {
val enclosingValName = definingValName(
c,
methodName =>
s"""$methodName must be directly assigned to a val, such as `val x = $methodName`.""")
s"""$methodName must be directly assigned to a val, such as `val Tooling = $methodName("tooling")`.""")
val id = c.Expr[String](Literal(Constant(enclosingValName)))
reify { Configuration.of(id.splice, name.splice) }
}