Skip to content

Commit b358290

Browse files
committed
Add result types to non-private methods
1 parent a806432 commit b358290

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

project/TastyMiMaFilters.scala

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,11 +65,8 @@ object TastyMiMaFilters {
6565

6666
// Problem: Inferred result type of non-private member differs
6767
ProblemMatcher.make(ProblemKind.MissingTermMember, "scala.collection.convert.JavaCollectionWrappers.IterableWrapperTrait.iterator"),
68-
ProblemMatcher.make(ProblemKind.IncompatibleTypeChange, "scala.util.matching.Regex.MatchIterator.replacementData"), // before: scala.Any; after: scala.collection.AbstractIterator[scala.util.matching.Regex] & scala.util.matching.Regex.Replacement
69-
ProblemMatcher.make(ProblemKind.MissingTermMember, "scala.util.hashing.Hashing.fromFunction"),
70-
ProblemMatcher.make(ProblemKind.IncompatibleTypeChange, "scala.collection.mutable.UnrolledBuffer.classTagCompanion"),
7168
ProblemMatcher.make(ProblemKind.MissingTermMember, "scala.collection.convert.JavaCollectionWrappers.SetWrapper.iterator"),
72-
ProblemMatcher.make(ProblemKind.MissingTermMember, "scala.collection.concurrent.FailedNode.string"),
69+
ProblemMatcher.make(ProblemKind.MissingTermMember, "scala.util.hashing.Hashing.fromFunction"),
7370

7471
// Problem: implicit class
7572
ProblemMatcher.make(ProblemKind.MissingTermMember, "scala.collection.generic.IsIterableLowPriority.is*LikeIsIterable"),
@@ -143,13 +140,15 @@ object TastyMiMaFilters {
143140
ProblemMatcher.make(ProblemKind.MissingTermMember, "scala.collection.package.+:.unapply"),
144141
ProblemMatcher.make(ProblemKind.MissingTermMember, "scala.collection.convert.impl.*StepperBase.semiclone"),
145142
ProblemMatcher.make(ProblemKind.NewAbstractMember, "scala.collection.convert.impl.*StepperBase.semiclone"),
143+
ProblemMatcher.make(ProblemKind.IncompatibleTypeChange, "scala.util.matching.Regex.MatchIterator.replacementData"), // before: scala.Any; after: scala.collection.AbstractIterator[scala.util.matching.Regex] & scala.util.matching.Regex.Replacement
146144

147145
// TASTy-MiMa bug? Wildcards in self type
148146
ProblemMatcher.make(ProblemKind.MissingTypeMember, "scala.collection.generic.DefaultSerializable._$1"),
149147

150148
// TASTy-MiMa bug? module classes
151149
ProblemMatcher.make(ProblemKind.IncompatibleTypeChange, "scala.collection.immutable.BitSet.bitSetFactory"), // The symbol scala.collection.immutable.BitSet.bitSetFactory has an incompatible type in current version: before: scala.collection.immutable.BitSet$; after: scala.collection.immutable.BitSet.type
152150
ProblemMatcher.make(ProblemKind.IncompatibleTypeChange, "scala.collection.mutable.BitSet.bitSetFactory"), // The symbol scala.collection.mutable.BitSet.bitSetFactory has an incompatible type in current version: before: scala.collection.mutable.BitSet$; after: scala.collection.mutable.BitSet.type
151+
ProblemMatcher.make(ProblemKind.IncompatibleTypeChange, "scala.collection.mutable.UnrolledBuffer.classTagCompanion"), // The symbol scala.collection.mutable.UnrolledBuffer.classTagCompanion has an incompatible type in current version: before: scala.collection.mutable.UnrolledBuffer$; after: scala.collection.mutable.UnrolledBuffer.type
153152

154153
// TASTy-MiMa bugs
155154
ProblemMatcher.make(ProblemKind.InternalError, "scala.collection.SeqView.appendedAll"),

stdlib-bootstrapped/src/scala/collection/concurrent/TrieMap.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -438,7 +438,7 @@ private[concurrent] object INode {
438438
private[concurrent] final class FailedNode[K, V](p: MainNode[K, V]) extends MainNode[K, V] {
439439
WRITE_PREV(p)
440440

441-
def string(lev: Int) = throw new UnsupportedOperationException
441+
def string(lev: Int): Nothing = throw new UnsupportedOperationException
442442

443443
def cachedSize(ct: AnyRef): Int = throw new UnsupportedOperationException
444444

stdlib-bootstrapped/src/scala/collection/mutable/UnrolledBuffer.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ sealed class UnrolledBuffer[T](implicit val tag: ClassTag[T])
8989
// def setLengthPolicy(nextLength: Int => Int): Unit = { myLengthPolicy = nextLength }
9090
private[collection] def calcNextLength(sz: Int) = sz // myLengthPolicy(sz)
9191

92-
def classTagCompanion = UnrolledBuffer
92+
def classTagCompanion: UnrolledBuffer.type = UnrolledBuffer
9393

9494
/** Concatenates the target unrolled buffer to this unrolled buffer.
9595
*

0 commit comments

Comments
 (0)