aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/core/Signature.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2014-03-26 18:45:03 +0100
committerDmitry Petrashko <dmitry.petrashko@gmail.com>2014-03-29 09:10:10 +0100
commit6a35e3018081a1a8dd90a3e24200223fdbfdce7f (patch)
tree9426d5c581a160ba4def17600a11b71ff45db052 /src/dotty/tools/dotc/core/Signature.scala
parent6db08e9457a8bcb093b8c8e79109f7ef419729c2 (diff)
downloaddotty-6a35e3018081a1a8dd90a3e24200223fdbfdce7f.tar.gz
dotty-6a35e3018081a1a8dd90a3e24200223fdbfdce7f.tar.bz2
dotty-6a35e3018081a1a8dd90a3e24200223fdbfdce7f.zip
Reworked erasure denotation transformer
Now works for all combinations of java/scala sue ErasedValueClass/go directly to underlying type constructors/others wildcards ok/not Signatures had to be refined as well, because the signature depends on whether a type comes form Java or Scala (handling of intersections is different). Also, replaced splitArray method in TypeApplication by extractors for single- and multi-dimensional array types in definitions.
Diffstat (limited to 'src/dotty/tools/dotc/core/Signature.scala')
-rw-r--r--src/dotty/tools/dotc/core/Signature.scala8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/dotty/tools/dotc/core/Signature.scala b/src/dotty/tools/dotc/core/Signature.scala
index 18e4e5f6c..02b91b18e 100644
--- a/src/dotty/tools/dotc/core/Signature.scala
+++ b/src/dotty/tools/dotc/core/Signature.scala
@@ -38,8 +38,8 @@ case class Signature private (paramsSig: List[TypeName], resSig: TypeName) {
/** Construct a signature by prepending the signature names of the given `params`
* to the parameter part of this signature.
*/
- def ++:(params: List[Type])(implicit ctx: Context) =
- Signature((params map sigName) ++ paramsSig, resSig)
+ def prepend(params: List[Type], isJava: Boolean)(implicit ctx: Context) =
+ Signature((params.map(sigName(_, isJava))) ++ paramsSig, resSig)
}
@@ -51,6 +51,6 @@ object Signature {
val NotAMethod = Signature(List(), EmptyTypeName)
/** The signature of a method with no parameters and result type `resultType`. */
- def apply(resultType: Type)(implicit ctx: Context): Signature =
- apply(Nil, sigName(resultType))
+ def apply(resultType: Type, isJava: Boolean)(implicit ctx: Context): Signature =
+ apply(Nil, sigName(resultType, isJava))
} \ No newline at end of file