diff options
author | Paul Phillips <paulp@improving.org> | 2010-11-29 22:20:39 +0000 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2010-11-29 22:20:39 +0000 |
commit | cbcf3f505144297ad197d0086ea7a4c4f1fbb598 (patch) | |
tree | bcacfa37635ad8293c831c3bd313806396cede76 /test/files/jvm/manifests.scala | |
parent | fa822e3ef63a7e11345dcdd2c81a1f565093a63c (diff) | |
download | scala-cbcf3f505144297ad197d0086ea7a4c4f1fbb598.tar.gz scala-cbcf3f505144297ad197d0086ea7a4c4f1fbb598.tar.bz2 scala-cbcf3f505144297ad197d0086ea7a4c4f1fbb598.zip |
"I invite everyone to change this rule, and obs...
"I invite everyone to change this rule, and observe what breaks!"
This much beloved comment from #1208 has been on my radar for two years.
The worm has turned. Closes #1208. The inferred type of an object is now
Foo.type instead of "object Foo". What once was this:
scala> val x: Map[Int, Singleton] = Map(1 -> None)
<console>:5: error: type mismatch;
found : (Int, object None)
required: (Int, Singleton)
Now exudes a pleasing aura of workingness:
scala> val x: Map[Int, Singleton] = Map(1 -> None)
x: Map[Int,Singleton] = Map(1 -> None)
No review.
Diffstat (limited to 'test/files/jvm/manifests.scala')
-rw-r--r-- | test/files/jvm/manifests.scala | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/test/files/jvm/manifests.scala b/test/files/jvm/manifests.scala index bb8843f834..3630b79776 100644 --- a/test/files/jvm/manifests.scala +++ b/test/files/jvm/manifests.scala @@ -38,8 +38,11 @@ object Test1 extends TestUtil { print(('abc, 'xyz)) println() - print(Test) - print(List) + // Disabled: should these work? changing the inference for objects from + // "object Test" to "Test.type" drags in a singleton manifest which for + // some reason leads to serialization failure. + // print(Test) + // print(List) println() print(new Foo(2)) |