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/tools/nsc/typechecker/Typers.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/tools/nsc/typechecker/Typers.scala')
-rw-r--r-- | src/compiler/scala/tools/nsc/typechecker/Typers.scala | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/Typers.scala b/src/compiler/scala/tools/nsc/typechecker/Typers.scala index 243d922732..884ad7af3d 100644 --- a/src/compiler/scala/tools/nsc/typechecker/Typers.scala +++ b/src/compiler/scala/tools/nsc/typechecker/Typers.scala @@ -2817,7 +2817,7 @@ trait Typers extends Modes with Adaptations with PatMatVirtualiser { } val bound = sym.existentialBound val sowner = if (isRawParameter(sym)) context.owner else sym.owner - val quantified = sowner.newExistential(sym.pos, name) + val quantified = sowner.newExistential(name, sym.pos) quantified setInfo bound.cloneInfo(quantified) } @@ -3079,7 +3079,7 @@ trait Typers extends Modes with Adaptations with PatMatVirtualiser { * */ ( context.owner newLocalDummy (ann.pos) - newValue (ann.pos, nme.self) + newValue (nme.self, ann.pos) setInfo (arg1.tpe.withoutAnnotations) ) } @@ -3120,9 +3120,9 @@ trait Typers extends Modes with Adaptations with PatMatVirtualiser { if (vble == NoSymbol) vble = if (isFullyDefined(pt)) - context.owner.newAliasType(tree.pos, name) setInfo pt + context.owner.newAliasType(name, tree.pos) setInfo pt else - context.owner.newAbstractType(tree.pos, name) setInfo TypeBounds.empty + context.owner.newAbstractType(name, tree.pos) setInfo TypeBounds.empty val rawInfo = vble.rawInfo vble = if (vble.name == tpnme.WILDCARD) context.scope.enter(vble) else namer.enterInScope(vble) @@ -3130,7 +3130,7 @@ trait Typers extends Modes with Adaptations with PatMatVirtualiser { } def typedBindTerm(name: TermName) = { if (vble == NoSymbol) - vble = context.owner.newValue(tree.pos, name) + vble = context.owner.newValue(name, tree.pos) if (vble.name.toTermName != nme.WILDCARD) { if ((mode & ALTmode) != 0) error(tree.pos, "illegal variable in pattern alternative") |