File tree 1 file changed +8
-5
lines changed
src/compiler/scala/tools/nsc/typechecker
1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -1436,11 +1436,14 @@ abstract class RefChecks extends Transform {
1436
1436
checkTypeRefBounds(ann.tpe, tree)
1437
1437
}
1438
1438
1439
- annots
1440
- .map(_.transformArgs(transformTrees))
1441
- .groupBy(_.symbol)
1442
- .flatMap((groupRepeatableAnnotations _).tupled)
1443
- .toList
1439
+ val annotsBySymbol = new mutable.LinkedHashMap [Symbol , ListBuffer [AnnotationInfo ]]()
1440
+ val transformedAnnots = annots.map(_.transformArgs(transformTrees))
1441
+ for (transformedAnnot <- transformedAnnots) {
1442
+ val buffer = annotsBySymbol.getOrElseUpdate(transformedAnnot.symbol, new ListBuffer )
1443
+ buffer += transformedAnnot
1444
+ }
1445
+ val result = annotsBySymbol.iterator.flatMap(x => groupRepeatableAnnotations(x._1, x._2.toList)).toList
1446
+ result
1444
1447
}
1445
1448
1446
1449
// assumes non-empty `anns`
You can’t perform that action at this time.
0 commit comments