diff options
author | Jason Zaugg <jzaugg@gmail.com> | 2016-08-09 15:42:44 +1000 |
---|---|---|
committer | Jason Zaugg <jzaugg@gmail.com> | 2016-08-19 09:26:40 +1000 |
commit | c141254b97a48e47ed7a6bfa08922671cc639081 (patch) | |
tree | 5133679c28c00c65f64e8423fb5fe256f885dc86 /test | |
parent | b8e4d1f692c5712990b45f50625627015112df32 (diff) | |
download | scala-c141254b97a48e47ed7a6bfa08922671cc639081.tar.gz scala-c141254b97a48e47ed7a6bfa08922671cc639081.tar.bz2 scala-c141254b97a48e47ed7a6bfa08922671cc639081.zip |
Determistically enter classes from directory into package scope
On Linux, the directory listing is not automatically sorted on Mac.
This leads to non-determistic ids of Symbols of the classes in a
directory, which in turn leads to instability of the ordering of
parents within inferred refinement types.
Notable, with this patch, we will stably infer:
```
scala> case class C(); case class D(); List(C(), D()).head
defined class C
defined class D
res0: Product with Serializable = C()
```
rather than sometimes getting `Serializable with Product` on
Linux. As such, I've removed the workarounds for this instability
in two test cases.
Diffstat (limited to 'test')
-rw-r--r-- | test/files/presentation/callcc-interpreter/Runner.scala | 5 | ||||
-rw-r--r-- | test/files/run/t7747-repl.scala | 4 |
2 files changed, 2 insertions, 7 deletions
diff --git a/test/files/presentation/callcc-interpreter/Runner.scala b/test/files/presentation/callcc-interpreter/Runner.scala index a5698be5c2..1c03e3d5ba 100644 --- a/test/files/presentation/callcc-interpreter/Runner.scala +++ b/test/files/presentation/callcc-interpreter/Runner.scala @@ -1,6 +1,3 @@ import scala.tools.nsc.interactive.tests._ -object Test extends InteractiveTest { - // Normalize ordering of LUB - override def normalize(s: String) = s.replace("Serializable with Product", "Product with Serializable") -} +object Test extends InteractiveTest diff --git a/test/files/run/t7747-repl.scala b/test/files/run/t7747-repl.scala index 0094d3ba98..8203f4c802 100644 --- a/test/files/run/t7747-repl.scala +++ b/test/files/run/t7747-repl.scala @@ -10,9 +10,7 @@ object Test extends ReplTest { override def normalize(s: String) = { // replace indylambda function names by <function0> - val s2 = """\$Lambda.*""".r.replaceAllIn(s, "<function0>") - // Normalize ordering of LUB - s2.replace("Serializable with Product", "Product with Serializable") + """\$Lambda.*""".r.replaceAllIn(s, "<function0>") } def code = """ |