diff options
author | Eugene Burmako <xeno.by@gmail.com> | 2014-02-11 15:37:37 +0100 |
---|---|---|
committer | Eugene Burmako <xeno.by@gmail.com> | 2014-02-15 09:32:26 +0100 |
commit | 2e4cce358d89f3c85a357ab2241790fafcdbf10a (patch) | |
tree | 5813c2254353900ea042cdcbbbba2530df4551fc /src | |
parent | 49c99e63f1e6121ebd4d67d8eac9d245fc7137e8 (diff) | |
download | scala-2e4cce358d89f3c85a357ab2241790fafcdbf10a.tar.gz scala-2e4cce358d89f3c85a357ab2241790fafcdbf10a.tar.bz2 scala-2e4cce358d89f3c85a357ab2241790fafcdbf10a.zip |
Type.companionType => Type.companion
I think that the "type" suffix here is redundant, so let's rename this API
to reduce the annoyance potential.
Diffstat (limited to 'src')
-rw-r--r-- | src/reflect/scala/reflect/api/Types.scala | 2 | ||||
-rw-r--r-- | src/reflect/scala/reflect/internal/Types.scala | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/reflect/scala/reflect/api/Types.scala b/src/reflect/scala/reflect/api/Types.scala index 90f12294c6..e026375ce5 100644 --- a/src/reflect/scala/reflect/api/Types.scala +++ b/src/reflect/scala/reflect/api/Types.scala @@ -132,7 +132,7 @@ trait Types { /** Type signature of the companion of the underlying class symbol. * NoType if the underlying symbol is not a class symbol, or if it doesn't have a companion. */ - def companionType: Type + def companion: Type /** Is this type a type constructor that is missing its type arguments? */ diff --git a/src/reflect/scala/reflect/internal/Types.scala b/src/reflect/scala/reflect/internal/Types.scala index 3bcc07caca..5da6ce026e 100644 --- a/src/reflect/scala/reflect/internal/Types.scala +++ b/src/reflect/scala/reflect/internal/Types.scala @@ -244,7 +244,7 @@ trait Types this.isInstanceOf[TypeRef] && typeSymbol.isAbstractType && !typeSymbol.isExistential } - def companionType = { + def companion = { val sym = typeSymbolDirect if (sym.isModule && !sym.isPackage) sym.companionSymbol.tpe else if (sym.isModuleClass && !sym.isPackageClass) sym.sourceModule.companionSymbol.tpe |