diff options
author | Ondrej Lhotak <olhotak@uwaterloo.ca> | 2014-10-08 11:49:19 +0200 |
---|---|---|
committer | Dmitry Petrashko <dmitry.petrashko@gmail.com> | 2014-11-22 20:10:20 +0100 |
commit | ade0565fcdf6cb95818f538a95f798c7456d4c72 (patch) | |
tree | e7fc8e5a372c91516d06400e7b41981714a4d143 /src/dotty/tools/dotc/core/Types.scala | |
parent | 03627e71d9fdc4b2211d244cc8fd844d57997357 (diff) | |
download | dotty-ade0565fcdf6cb95818f538a95f798c7456d4c72.tar.gz dotty-ade0565fcdf6cb95818f538a95f798c7456d4c72.tar.bz2 dotty-ade0565fcdf6cb95818f538a95f798c7456d4c72.zip |
desugar Java repeated parms into an Array instead of Seq
Diffstat (limited to 'src/dotty/tools/dotc/core/Types.scala')
-rw-r--r-- | src/dotty/tools/dotc/core/Types.scala | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/dotty/tools/dotc/core/Types.scala b/src/dotty/tools/dotc/core/Types.scala index 601870e55..2997e9e77 100644 --- a/src/dotty/tools/dotc/core/Types.scala +++ b/src/dotty/tools/dotc/core/Types.scala @@ -1974,7 +1974,9 @@ object Types { def fromSymbols(params: List[Symbol], resultType: Type)(implicit ctx: Context) = { def paramInfo(param: Symbol): Type = param.info match { case AnnotatedType(annot, tp) if annot matches defn.RepeatedAnnot => - tp.translateParameterized(defn.SeqClass, defn.RepeatedParamClass) + val typeSym = param.info.typeSymbol.asClass + assert(typeSym == defn.SeqClass || typeSym == defn.ArrayClass) + tp.translateParameterized(typeSym, defn.RepeatedParamClass) case tp => tp } |