From 49132b99451ceea8a58a70185f1a800f4d040af9 Mon Sep 17 00:00:00 2001 From: Paul Phillips Date: Sun, 19 May 2013 12:40:31 -0700 Subject: Make cookJavaRawInfo return this.type. A lot more useful than Unit. --- src/reflect/scala/reflect/internal/Symbols.scala | 6 ++++-- 1 file 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 -- cgit v1.2.3