diff options
author | Paul Phillips <paulp@improving.org> | 2011-12-26 14:26:05 -0800 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2011-12-30 11:19:05 -0800 |
commit | d323f2f8d631404f10887d73e075e56a3fffc755 (patch) | |
tree | c2edc3e3d67b355ee717d88a189fb7ba023f0516 /src/compiler/scala/tools/nsc/symtab/classfile/ClassfileParser.scala | |
parent | b2b59a124a2a8adf8e88c1e692c96263e0955b16 (diff) | |
download | scala-d323f2f8d631404f10887d73e075e56a3fffc755.tar.gz scala-d323f2f8d631404f10887d73e075e56a3fffc755.tar.bz2 scala-d323f2f8d631404f10887d73e075e56a3fffc755.zip |
Creator for existentials which flattens.
Currently it is possible to end up with nested existentials,
because existentialAbstraction only looks one level deeper.
This works harder to flatten them.
Diffstat (limited to 'src/compiler/scala/tools/nsc/symtab/classfile/ClassfileParser.scala')
-rw-r--r-- | src/compiler/scala/tools/nsc/symtab/classfile/ClassfileParser.scala | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/compiler/scala/tools/nsc/symtab/classfile/ClassfileParser.scala b/src/compiler/scala/tools/nsc/symtab/classfile/ClassfileParser.scala index e67ce90cfa..b73eaff524 100644 --- a/src/compiler/scala/tools/nsc/symtab/classfile/ClassfileParser.scala +++ b/src/compiler/scala/tools/nsc/symtab/classfile/ClassfileParser.scala @@ -682,8 +682,6 @@ abstract class ClassfileParser { while (!isDelimiter(sig(index))) { index += 1 } sig.subName(start, index) } - def existentialType(tparams: List[Symbol], tp: Type): Type = - if (tparams.isEmpty) tp else ExistentialType(tparams, tp) def sig2type(tparams: immutable.Map[Name,Symbol], skiptvs: Boolean): Type = { val tag = sig(index); index += 1 tag match { @@ -729,14 +727,14 @@ abstract class ClassfileParser { } accept('>') assert(xs.length > 0) - existentialType(existentials.toList, typeRef(pre, classSym, xs.toList)) + newExistentialType(existentials.toList, typeRef(pre, classSym, xs.toList)) } else if (classSym.isMonomorphicType) { tp } else { // raw type - existentially quantify all type parameters val eparams = typeParamsToExistentials(classSym, classSym.unsafeTypeParams) val t = typeRef(pre, classSym, eparams.map(_.tpe)) - val res = existentialType(eparams, t) + val res = newExistentialType(eparams, t) if (settings.debug.value && settings.verbose.value) println("raw type " + classSym + " -> " + res) res |