summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2013-05-19 12:40:31 -0700
committerPaul Phillips <paulp@improving.org>2013-05-20 10:01:40 -0700
commit49132b99451ceea8a58a70185f1a800f4d040af9 (patch)
treeb7851cbf291228cff3d6cc38bdd3dfdf2ad8797f
parent97fe31169c5135069f8f247637dff3d5e3444de0 (diff)
downloadscala-49132b99451ceea8a58a70185f1a800f4d040af9.tar.gz
scala-49132b99451ceea8a58a70185f1a800f4d040af9.tar.bz2
scala-49132b99451ceea8a58a70185f1a800f4d040af9.zip
Make cookJavaRawInfo return this.type.
A lot more useful than Unit.
-rw-r--r--src/reflect/scala/reflect/internal/Symbols.scala6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/reflect/scala/reflect/internal/Symbols.scala b/src/reflect/scala/reflect/internal/Symbols.scala
index 24bcfbb8d2..af20b8b756 100644
--- a/src/reflect/scala/reflect/internal/Symbols.scala
+++ b/src/reflect/scala/reflect/internal/Symbols.scala
@@ -1504,10 +1504,10 @@ trait Symbols extends api.Symbols { self: SymbolTable =>
* This is done in checkAccessible and overriding checks in refchecks
* We can't do this on class loading because it would result in infinite cycles.
*/
- def cookJavaRawInfo(): Unit = {
+ def cookJavaRawInfo(): this.type = {
// only try once...
if (phase.erasedTypes || (this hasFlag TRIEDCOOKING))
- return
+ return this
this setFlag TRIEDCOOKING
info // force the current info
@@ -1515,6 +1515,8 @@ trait Symbols extends api.Symbols { self: SymbolTable =>
this modifyInfo rawToExistential
else if (isOverloaded)
alternatives withFilter (_.isJavaDefined) foreach (_ modifyInfo rawToExistential)
+
+ this
}
/** The logic approximately boils down to finding the most recent phase