Skip to content

Commit

Permalink
Replace usage of printer to create patch with a simple string prefix
Browse files Browse the repository at this point in the history
Co-authored-by: Hamza Remmal <hamza@remmal.net>
  • Loading branch information
WojciechMazur and hamzaremmal authored Aug 20, 2024
1 parent 03fc304 commit 90eedc5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion compiler/src/dotty/tools/dotc/typer/Checking.scala
Original file line number Diff line number Diff line change
Expand Up @@ -910,7 +910,7 @@ object Checking {
report.errorOrMigrationWarning(NonNamedArgumentInJavaAnnotation(), param, MigrationVersion.NonNamedArgumentInJavaAnnotation)
if MigrationVersion.NonNamedArgumentInJavaAnnotation.needsPatch then
annotationFieldNamesByIdx.get(paramIdx).foreach: paramName =>
patch(param.span, untpd.cpy.NamedArg(param)(paramName, param).show)
patch(param.span.startPos, s"$paramName = ")
annot
case _ => annot
end checkNamedArgumentForJavaAnnotation
Expand Down

0 comments on commit 90eedc5

Please sign in to comment.