diff options
author | Martin Odersky <odersky@gmail.com> | 2010-03-29 12:53:07 +0000 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2010-03-29 12:53:07 +0000 |
commit | 97515089566b5f138d3a5cb73769d54178d210d4 (patch) | |
tree | 547121bced007c255017d36f3cd21966624aaac3 /src | |
parent | 83c817f84c7268a1ba729f8e0ef90336906bfc58 (diff) | |
download | scala-97515089566b5f138d3a5cb73769d54178d210d4.tar.gz scala-97515089566b5f138d3a5cb73769d54178d210d4.tar.bz2 scala-97515089566b5f138d3a5cb73769d54178d210d4.zip |
Closes #2386 by requiring class manifests for a...
Closes #2386 by requiring class manifests for an array element type if a
class manifaest for the array type is demanded. Review by dubochet.
Diffstat (limited to 'src')
-rw-r--r-- | src/compiler/scala/tools/nsc/typechecker/Implicits.scala | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/Implicits.scala b/src/compiler/scala/tools/nsc/typechecker/Implicits.scala index ab933227fb..c83fd1bcb2 100644 --- a/src/compiler/scala/tools/nsc/typechecker/Implicits.scala +++ b/src/compiler/scala/tools/nsc/typechecker/Implicits.scala @@ -784,6 +784,7 @@ self: Analyzer => inferImplicit(tree, appliedType(manifestClass.typeConstructor, List(tp)), true, false, context).tree def findSubManifest(tp: Type) = findManifest(tp, if (full) FullManifestClass else OptManifestClass) + def findElemManifest(tp: Type) = findManifest(tp, if (full) FullManifestClass else PartialManifestClass) def mot(tp0: Type): Tree = { val tp1 = tp0.normalize @@ -800,7 +801,7 @@ self: Analyzer => } else if (sym == RepeatedParamClass || sym == ByNameParamClass) { EmptyTree } else if (sym == ArrayClass && args.length == 1) { - manifestFactoryCall("arrayType", args.head, findSubManifest(args.head)) + manifestFactoryCall("arrayType", args.head, findElemManifest(args.head)) } else if (sym.isClass) { val suffix = gen.mkClassOf(tp1) :: (args map findSubManifest) manifestFactoryCall( |