File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed
src/compiler/scala/tools/nsc/typechecker Expand file tree Collapse file tree 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 {
14361436 checkTypeRefBounds(ann.tpe, tree)
14371437 }
14381438
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
14441447 }
14451448
14461449 // assumes non-empty `anns`
You can’t perform that action at this time.
0 commit comments