Skip to content

Commit 63c8b4c

Browse files
committed
fix: update warning message for transientDefault when no default value is provided
1 parent deb5dbb commit 63c8b4c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

macros/src/main/scala/com/avsystem/commons/macros/serialization/GenCodecMacros.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ class GenCodecMacros(ctx: blackbox.Context) extends CodecMacroCommons(ctx) with
134134
def isTransientDefault(param: ApplyParam, warnIfDefaultNotProvided: Boolean = false): Boolean =
135135
(hasAnnotation(param.sym, TransientDefaultAnnotType), param.defaultValue.nonEmpty, warnIfDefaultNotProvided) match {
136136
case (true, false, true) =>
137-
c.warning(param.sym.pos, s"@transientDefault has no effect on parameter ${param.sym.name} because it has no default value")
137+
warning(s"@transientDefault has no effect on parameter ${param.sym.name} because it has no default value")
138138
false
139139
case (hasAnnotation, noDefaultValue, _) => hasAnnotation && noDefaultValue
140140
}

0 commit comments

Comments
 (0)