summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/typechecker/Typers.scala
diff options
context:
space:
mode:
authorEugene Burmako <xeno.by@gmail.com>2012-06-06 10:37:31 +0200
committerEugene Burmako <xeno.by@gmail.com>2012-06-08 15:32:08 +0200
commit3896a416faffe337a96f873214b02f231f306174 (patch)
tree73280b539c520818adbd1a9e49d9d1344fbd5dc1 /src/compiler/scala/tools/nsc/typechecker/Typers.scala
parent6355d1a0b825c99560d4ccec1a8769f7421b1a71 (diff)
downloadscala-3896a416faffe337a96f873214b02f231f306174.tar.gz
scala-3896a416faffe337a96f873214b02f231f306174.tar.bz2
scala-3896a416faffe337a96f873214b02f231f306174.zip
miscellaneous cleanup, mostly fighting with feature warnings
Diffstat (limited to 'src/compiler/scala/tools/nsc/typechecker/Typers.scala')
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/Typers.scala5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/Typers.scala b/src/compiler/scala/tools/nsc/typechecker/Typers.scala
index 30202ed3b5..f46d161da5 100644
--- a/src/compiler/scala/tools/nsc/typechecker/Typers.scala
+++ b/src/compiler/scala/tools/nsc/typechecker/Typers.scala
@@ -3644,7 +3644,7 @@ trait Typers extends Modes with Adaptations with Tags {
case t => (t, Nil)
}
- @inline def hasNamedArg(as: List[Tree]) = as collectFirst {case AssignOrNamedArg(lhs, rhs) =>} nonEmpty
+ @inline def hasNamedArg(as: List[Tree]) = as.collectFirst{case AssignOrNamedArg(lhs, rhs) =>}.nonEmpty
// note: context.tree includes at most one Apply node
// thus, we can't use it to detect we're going to receive named args in expressions such as:
@@ -3664,7 +3664,7 @@ trait Typers extends Modes with Adaptations with Tags {
}
val dynSel = Select(qual, oper)
- val tappSel = if (explicitTargs nonEmpty) TypeApply(dynSel, explicitTargs) else dynSel
+ val tappSel = if (explicitTargs.nonEmpty) TypeApply(dynSel, explicitTargs) else dynSel
atPos(qual.pos)(Apply(tappSel, List(Literal(Constant(name.decode)))))
}
@@ -4874,6 +4874,7 @@ trait Typers extends Modes with Adaptations with Tags {
}
case ApplyDynamic(qual, args) =>
+ assert(phase.erasedTypes)
val reflectiveCalls = !(settings.refinementMethodDispatch.value == "invoke-dynamic")
val qual1 = typed(qual, AnyRefClass.tpe)
val args1 = args mapConserve (arg => if (reflectiveCalls) typed(arg, AnyRefClass.tpe) else typed(arg))