@@ -115,8 +115,6 @@ case class AggregateClassPath(aggregates: Seq[ClassPath]) extends ClassPath {
115
115
* having the TASTy in a later classpath entry.
116
116
*/
117
117
private def mergeClassesAndSources (entries : scala.collection.Seq [ClassRepresentation ]): Seq [ClassRepresentation ] = {
118
- def onlyClassEntry (entry : ClassRepresentation ): Boolean = ! entry.tasty.isDefined && entry.classfile.isDefined
119
- def onlyTastyEntry (entry : ClassRepresentation ): Boolean = ! entry.classfile.isDefined && entry.tasty.isDefined
120
118
// based on the implementation from MergedClassPath
121
119
var count = 0
122
120
val indices = util.HashMap [String , Int ]()
@@ -133,10 +131,10 @@ case class AggregateClassPath(aggregates: Seq[ClassPath]) extends ClassPath {
133
131
mergedEntries(index) = BinaryAndSourceFilesEntry (existing, entry)
134
132
case (entry : BinaryFileEntry , existing : SourceFileEntry ) =>
135
133
mergedEntries(index) = BinaryAndSourceFilesEntry (entry, existing)
136
- case (entry : BinaryFileEntry , existing : BinaryFileEntry ) if onlyClassEntry(existing) && onlyTastyEntry(entry ) =>
134
+ case (entry @ TastyFileEntry (_, None ), _ : ClassFileEntry ) =>
137
135
mergedEntries(index) = entry
138
- case (entry : BinaryFileEntry , existing : BinaryAndSourceFilesEntry ) if onlyClassEntry(existing) && onlyTastyEntry(entry ) =>
139
- mergedEntries(index) = BinaryAndSourceFilesEntry (entry, existing. sourceEntry)
136
+ case (entry @ TastyFileEntry (_, None ), BinaryAndSourceFilesEntry ( _ : ClassFileEntry , sourceEntry) ) =>
137
+ mergedEntries(index) = BinaryAndSourceFilesEntry (entry, sourceEntry)
140
138
case _ =>
141
139
}
142
140
else {
0 commit comments