File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -107,12 +107,14 @@ func listTestsForSwiftPM(_ tests: some Sequence<Test>) -> [String] {
107107 // Group tests by the name components of the tests' IDs. If the name
108108 // components of two tests' IDs are ambiguous, present their source locations
109109 // to disambiguate.
110- return Dictionary (
110+ let initialGroups = Dictionary (
111111 grouping: tests. lazy. map ( \. id) ,
112112 by: \. nameComponents
113113 ) . values. lazy
114114 . map { ( $0, isAmbiguous: $0. count > 1 ) }
115- . flatMap { testIDs, isAmbiguous in
115+
116+ // This operation is split to improve type-checking performance.
117+ return initialGroups. flatMap { testIDs, isAmbiguous in
116118 testIDs. lazy
117119 . map { testID in
118120 if !isAmbiguous, testID. sourceLocation != nil {
You can’t perform that action at this time.
0 commit comments