summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/typechecker/Typers.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2011-07-30 21:04:43 +0000
committerMartin Odersky <odersky@gmail.com>2011-07-30 21:04:43 +0000
commitc0db3f2d065e22796a2c917c6c3b0f14f3982cf0 (patch)
treea21a5982ec9d0a6311843b2e1397192a3a64aecd /src/compiler/scala/tools/nsc/typechecker/Typers.scala
parentd0c5e4be5554f4862da0690ac0315a4433fcb5d5 (diff)
downloadscala-c0db3f2d065e22796a2c917c6c3b0f14f3982cf0.tar.gz
scala-c0db3f2d065e22796a2c917c6c3b0f14f3982cf0.tar.bz2
scala-c0db3f2d065e22796a2c917c6c3b0f14f3982cf0.zip
LiftCode works again, now integrated with new r...
LiftCode works again, now integrated with new reflection library. Other changes: def Literal(x: Any) has been deprecated, and all its uses removed. Modifiers has lost positions as fourth case class argument; is now a field, mirroring Tree.pos (this removes junk in patterns and makes reification simpler). Review by extempore.
Diffstat (limited to 'src/compiler/scala/tools/nsc/typechecker/Typers.scala')
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/Typers.scala6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/Typers.scala b/src/compiler/scala/tools/nsc/typechecker/Typers.scala
index 23482eb609..0385cfee63 100644
--- a/src/compiler/scala/tools/nsc/typechecker/Typers.scala
+++ b/src/compiler/scala/tools/nsc/typechecker/Typers.scala
@@ -906,7 +906,7 @@ trait Typers extends Modes with Adaptations {
if (sym == UnitClass && tree.tpe <:< AnyClass.tpe) { // (12)
if (settings.warnValueDiscard.value)
context.unit.warning(tree.pos, "discarded non-Unit value")
- return typed(atPos(tree.pos)(Block(List(tree), Literal(()))), mode, pt)
+ return typed(atPos(tree.pos)(Block(List(tree), Literal(Constant()))), mode, pt)
}
else if (isNumericValueClass(sym) && isNumericSubType(tree.tpe, pt)) {
if (settings.warnNumericWiden.value)
@@ -986,7 +986,7 @@ trait Typers extends Modes with Adaptations {
case t: Tree => t
case _ =>
context.undetparams = savedUndetparams
- val valueDiscard = atPos(tree.pos)(Block(List(instantiate(tree, mode, WildcardType)), Literal(())))
+ val valueDiscard = atPos(tree.pos)(Block(List(instantiate(tree, mode, WildcardType)), Literal(Constant())))
typed(valueDiscard, mode, UnitClass.tpe)
}
}
@@ -1534,7 +1534,7 @@ trait Typers extends Modes with Adaptations {
* into the symbol's ``annotations'' in the type completer / namer)
*/
def removeAnnotations(mods: Modifiers): Modifiers =
- mods.copy(annotations = Nil)
+ mods.copy(annotations = Nil) setPositions mods.positions
/**
* @param vdef ...