Skip to content

Commit 28f26fc

Browse files
committed
Merge pull request scala#2566 from paulp/pr/nondeterminism
An attempt to make tests deterministic.
2 parents 16e92f4 + b6757e1 commit 28f26fc

File tree

4 files changed

+8
-3
lines changed

4 files changed

+8
-3
lines changed

src/interactive/scala/tools/nsc/interactive/CompilerControl.scala

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -297,6 +297,11 @@ trait CompilerControl { self: Global =>
297297
def implicitlyAdded = false
298298

299299
private def accessible_s = if (accessible) "" else "[inaccessible] "
300+
def forceInfoString = {
301+
definitions.fullyInitializeSymbol(sym)
302+
definitions.fullyInitializeType(tpe)
303+
infoString
304+
}
300305
def infoString = s"$accessible_s${sym.defStringSeenAs(tpe)}"
301306
}
302307

src/interactive/scala/tools/nsc/interactive/tests/core/CoreTestDefs.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ private[tests] trait CoreTestDefs
2727
reporter.println("retrieved %d members".format(members.size))
2828
compiler ask { () =>
2929
val filtered = members.filterNot(member => (member.sym.name string_== "getClass") || member.sym.isConstructor)
30-
reporter println (filtered.map(_.infoString).sorted mkString "\n")
30+
reporter println (filtered.map(_.forceInfoString).sorted mkString "\n")
3131
}
3232
}
3333
}

test/files/presentation/ide-bug-1000531.check

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ retrieved 124 members
77
[inaccessible] protected[package lang] def clone(): Object
88
[inaccessible] protected[package lang] def finalize(): Unit
99
[inaccessible] protected[this] def reversed: List[B]
10-
class GroupedIterator[B <: <?>] extends AbstractIterator[Seq[B]] with Iterator[Seq[B]]
10+
class GroupedIterator[B >: A] extends AbstractIterator[Seq[B]] with Iterator[Seq[B]]
1111
def +(other: String): String
1212
def ++[B >: B](that: => scala.collection.GenTraversableOnce[B]): Iterator[B]
1313
def ->[B](y: B): (java.util.Iterator[B], B)

test/files/presentation/implicit-member.check

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ def formatted(fmtstr: String): String
1515
def hashCode(): Int
1616
def toString(): String
1717
def →[B](y: B): (Implicit.type, B)
18-
final class AppliedImplicit[A <: <?>] extends AnyRef
18+
final class AppliedImplicit[A] extends AnyRef
1919
final def !=(x$1: Any): Boolean
2020
final def !=(x$1: AnyRef): Boolean
2121
final def ##(): Int

0 commit comments

Comments
 (0)