diff options
author | Martin Odersky <odersky@gmail.com> | 2008-02-11 19:48:43 +0000 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2008-02-11 19:48:43 +0000 |
commit | 8c53284280fa1db27274e930d516fafbbc238d49 (patch) | |
tree | 2a0eff7e4c4e2d3116fabf8ffbfa294da6bf8640 /src | |
parent | 6b74adde4a5d857e94d18c5af198b49251c56b51 (diff) | |
download | scala-8c53284280fa1db27274e930d516fafbbc238d49.tar.gz scala-8c53284280fa1db27274e930d516fafbbc238d49.tar.bz2 scala-8c53284280fa1db27274e930d516fafbbc238d49.zip |
fixed build problem for sbaz; fixed one half of...
fixed build problem for sbaz; fixed one half of #470
Diffstat (limited to 'src')
4 files changed, 7 insertions, 6 deletions
diff --git a/src/compiler/scala/tools/nsc/symtab/Types.scala b/src/compiler/scala/tools/nsc/symtab/Types.scala index aca7f823c1..3f399d167a 100644 --- a/src/compiler/scala/tools/nsc/symtab/Types.scala +++ b/src/compiler/scala/tools/nsc/symtab/Types.scala @@ -2036,6 +2036,7 @@ A type's typeSymbol should never be inspected directly. else tycon match { case TypeRef(pre, sym, _) => typeRef(pre, sym, args) case PolyType(tparams, restpe) => restpe.instantiateTypeParams(tparams, args) + case ExistentialType(tparams, restpe) => ExistentialType(tparams, appliedType(restpe, args)) case ErrorType => tycon case st: SingletonType => appliedType(st.widen, args) // @M TODO: what to do? see bug1 case _ => throw new Error(debugString(tycon)) diff --git a/src/compiler/scala/tools/nsc/typechecker/Namers.scala b/src/compiler/scala/tools/nsc/typechecker/Namers.scala index 3a6d08b0e2..34ba460f90 100644 --- a/src/compiler/scala/tools/nsc/typechecker/Namers.scala +++ b/src/compiler/scala/tools/nsc/typechecker/Namers.scala @@ -392,7 +392,7 @@ trait Namers { self: Analyzer => def enterSyntheticSym(tree: Tree): Symbol = { enterSym(tree) - synthetics(tree.symbol) = tree + synthetics(tree.symbol) = (tree, context.unit.source) tree.symbol } diff --git a/src/compiler/scala/tools/nsc/typechecker/Typers.scala b/src/compiler/scala/tools/nsc/typechecker/Typers.scala index 915a6a159e..1586093c76 100644 --- a/src/compiler/scala/tools/nsc/typechecker/Typers.scala +++ b/src/compiler/scala/tools/nsc/typechecker/Typers.scala @@ -12,7 +12,7 @@ package scala.tools.nsc.typechecker import scala.collection.mutable.{HashMap, ListBuffer} import scala.compat.Platform.currentTime -import scala.tools.nsc.util.{HashSet, Position, Set, NoPosition} +import scala.tools.nsc.util.{HashSet, Position, Set, NoPosition, SourceFile} import symtab.Flags._ import util.HashSet @@ -38,7 +38,7 @@ trait Typers { self: Analyzer => private val superDefs = new HashMap[Symbol, ListBuffer[Tree]] - val synthetics = new HashMap[Symbol, Tree] + val synthetics = new HashMap[Symbol, (Tree, SourceFile)] def resetTyper() { resetContexts @@ -1549,10 +1549,10 @@ trait Typers { self: Analyzer => // add synthetics synthetics get e.sym match { - case Some(tree) => + case Some((tree, source)) if (source eq context.unit.source) => newStats += tree synthetics -= e.sym - case None => + case _ => } e = e.next diff --git a/src/compiler/scala/tools/nsc/typechecker/Unapplies.scala b/src/compiler/scala/tools/nsc/typechecker/Unapplies.scala index 95bc0bce61..334e6d1f48 100644 --- a/src/compiler/scala/tools/nsc/typechecker/Unapplies.scala +++ b/src/compiler/scala/tools/nsc/typechecker/Unapplies.scala @@ -153,7 +153,7 @@ trait Unapplies { self: Analyzer => val RP = nme.REPEATED_PARAM_CLASS_NAME.toTypeName param.tpt match { case AppliedTypeTree(Select(_, RP), _) => Typed(id, Ident(nme.WILDCARD_STAR.toTypeName)) - case _ =>id + case _ => id } } val cparams = constrParams(cdef) |