diff options
author | Paul Phillips <paulp@improving.org> | 2012-01-16 07:09:07 -0800 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2012-01-16 13:27:08 -0800 |
commit | bf6ce00f2146ae2c3feb5d2c8a2ed5f5d441ba3b (patch) | |
tree | 985b1dd8ea85476c73c03a09390a9d513ccc1017 /src/compiler/scala/reflect/internal/Types.scala | |
parent | 44d783a5eaa4e77c45c6565a70395525712ded23 (diff) | |
download | scala-bf6ce00f2146ae2c3feb5d2c8a2ed5f5d441ba3b.tar.gz scala-bf6ce00f2146ae2c3feb5d2c8a2ed5f5d441ba3b.tar.bz2 scala-bf6ce00f2146ae2c3feb5d2c8a2ed5f5d441ba3b.zip |
Symbol creation followup.
Changed most symbol creations to be consistent with all the others.
Opportunistically streamlined various call sites. Moved some phase-specific
methods out of Symbol to somewhere more appropriate (like that phase.)
Diffstat (limited to 'src/compiler/scala/reflect/internal/Types.scala')
-rw-r--r-- | src/compiler/scala/reflect/internal/Types.scala | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/compiler/scala/reflect/internal/Types.scala b/src/compiler/scala/reflect/internal/Types.scala index dfe098e282..73f1f3db84 100644 --- a/src/compiler/scala/reflect/internal/Types.scala +++ b/src/compiler/scala/reflect/internal/Types.scala @@ -3726,7 +3726,7 @@ trait Types extends api.Types { self: SymbolTable => def typeParamsToExistentials(clazz: Symbol, tparams: List[Symbol]): List[Symbol] = { val eparams = mapWithIndex(tparams)((tparam, i) => - clazz.newExistential(clazz.pos, newTypeName("?"+i)) setInfo tparam.info.bounds) + clazz.newExistential(newTypeName("?"+i), clazz.pos) setInfo tparam.info.bounds) eparams map (_ substInfo (tparams, eparams)) } @@ -3848,10 +3848,10 @@ trait Types extends api.Types { self: SymbolTable => if (tree.symbol isNonBottomSubClass clazz) && (pre.widen.typeSymbol isNonBottomSubClass tree.symbol) => if (pre.isStable) { // XXX why is this in this method? pull it out and guard the call `annotationArgRewriter.transform(tree)`? - val termSym = - pre.typeSymbol.owner.newValue( - pre.typeSymbol.pos, - pre.typeSymbol.name.toTermName).setInfo(pre) // what symbol should really be used? + val termSym = ( + pre.typeSymbol.owner.newValue(pre.typeSymbol.name.toTermName, pre.typeSymbol.pos) // what symbol should really be used? + setInfo pre + ) gen.mkAttributedQualifier(pre, termSym) } else giveup() @@ -4205,7 +4205,7 @@ trait Types extends api.Types { self: SymbolTable => val symowner = oldSym.owner val bound = singletonBounds(actualsIndexed(actualIdx)) - val sym = symowner.newExistential(oldSym.pos, newTypeName(oldSym.name + ".type")) + val sym = symowner.newExistential(newTypeName(oldSym.name + ".type"), oldSym.pos) sym.setInfo(bound) sym.setFlag(oldSym.flags) @@ -5892,7 +5892,7 @@ trait Types extends api.Types { self: SymbolTable => else { def lubBounds(bnds: List[TypeBounds]): TypeBounds = TypeBounds(glb(bnds map (_.lo), decr(depth)), lub(bnds map (_.hi), decr(depth))) - lubRefined.typeSymbol.newAbstractType(proto.pos, proto.name.toTypeName) + lubRefined.typeSymbol.newAbstractType(proto.name.toTypeName, proto.pos) .setInfoOwnerAdjusted(lubBounds(symtypes map (_.bounds))) } } |