Skip to content

Commit 90eedc5

Browse files
Replace usage of printer to create patch with a simple string prefix
Co-authored-by: Hamza Remmal <[email protected]>
1 parent 03fc304 commit 90eedc5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compiler/src/dotty/tools/dotc/typer/Checking.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -910,7 +910,7 @@ object Checking {
910910
report.errorOrMigrationWarning(NonNamedArgumentInJavaAnnotation(), param, MigrationVersion.NonNamedArgumentInJavaAnnotation)
911911
if MigrationVersion.NonNamedArgumentInJavaAnnotation.needsPatch then
912912
annotationFieldNamesByIdx.get(paramIdx).foreach: paramName =>
913-
patch(param.span, untpd.cpy.NamedArg(param)(paramName, param).show)
913+
patch(param.span.startPos, s"$paramName = ")
914914
annot
915915
case _ => annot
916916
end checkNamedArgumentForJavaAnnotation

0 commit comments

Comments
 (0)