diff options
author | Den Shabalin <den.shabalin@gmail.com> | 2013-12-09 17:33:59 +0100 |
---|---|---|
committer | Den Shabalin <den.shabalin@gmail.com> | 2013-12-11 02:42:34 +0100 |
commit | 495b7b873b65b5847ddcde40e4ed92c7119ed448 (patch) | |
tree | eeac8d1a0cd0361cee347a6a6acafa0fef4103ec /src | |
parent | a09914ca9f7b65e839fddaeb88d318bec52245b8 (diff) | |
download | scala-495b7b873b65b5847ddcde40e4ed92c7119ed448.tar.gz scala-495b7b873b65b5847ddcde40e4ed92c7119ed448.tar.bz2 scala-495b7b873b65b5847ddcde40e4ed92c7119ed448.zip |
Address minor pull request feedback points
1. Use (x1, x2): (T1, T2) instead of (x1: T1, x2: T2)
2. More detailed error message for improper function argument
3. Fix typo
4. Completely remove LiftableClass symbol from definitions
Diffstat (limited to 'src')
4 files changed, 3 insertions, 5 deletions
diff --git a/src/compiler/scala/tools/reflect/quasiquotes/Holes.scala b/src/compiler/scala/tools/reflect/quasiquotes/Holes.scala index 8457649bce..f5bcaf68e0 100644 --- a/src/compiler/scala/tools/reflect/quasiquotes/Holes.scala +++ b/src/compiler/scala/tools/reflect/quasiquotes/Holes.scala @@ -73,7 +73,7 @@ trait Holes { self: Quasiquotes => } class ApplyHole(card: Cardinality, splicee: Tree) extends Hole { - val (strippedTpe: Type, tpe: Type) = { + val (strippedTpe, tpe): (Type, Type) = { if (stripIterable(splicee.tpe)._1.value < card.value) cantSplice() val (_, strippedTpe) = stripIterable(splicee.tpe, limit = Some(card)) if (isBottomType(strippedTpe)) cantSplice() diff --git a/src/reflect/scala/reflect/internal/BuildUtils.scala b/src/reflect/scala/reflect/internal/BuildUtils.scala index 6f2cb239c5..13c2268227 100644 --- a/src/reflect/scala/reflect/internal/BuildUtils.scala +++ b/src/reflect/scala/reflect/internal/BuildUtils.scala @@ -212,7 +212,7 @@ trait BuildUtils { self: SymbolTable => case Nil :: (tail @ ((head :: _) :: _)) if head.mods.isImplicit => tail case other => other } - // undo flag modifications by mergeing flag info from constructor args and fieldDefs + // undo flag modifications by merging flag info from constructor args and fieldDefs val modsMap = fieldDefs.map { case ValDef(mods, name, _, _) => name -> mods }.toMap def ctorArgsCorrespondToFields = vparamssRestoredImplicits.flatten.forall { vd => modsMap.contains(vd.name) } if (!ctorArgsCorrespondToFields) None @@ -394,7 +394,7 @@ trait BuildUtils { self: SymbolTable => object SyntacticFunction extends SyntacticFunctionExtractor { def apply(params: List[Tree], body: Tree): Tree = { val params0 :: Nil = mkVparamss(params :: Nil) - require(params0.forall { _.rhs.isEmpty }, "anonymous functions don't support default values") + require(params0.forall { _.rhs.isEmpty }, "anonymous functions don't support parameters with default values") Function(params0, body) } diff --git a/src/reflect/scala/reflect/internal/Definitions.scala b/src/reflect/scala/reflect/internal/Definitions.scala index 6420bcb429..1fe6f249b8 100644 --- a/src/reflect/scala/reflect/internal/Definitions.scala +++ b/src/reflect/scala/reflect/internal/Definitions.scala @@ -481,7 +481,6 @@ trait Definitions extends api.StandardDefinitions { lazy val TypeCreatorClass = getClassIfDefined("scala.reflect.api.TypeCreator") // defined in scala-reflect.jar, so we need to be careful lazy val TreeCreatorClass = getClassIfDefined("scala.reflect.api.TreeCreator") // defined in scala-reflect.jar, so we need to be careful - lazy val LiftableClass = NoSymbol lazy val BlackboxMacroClass = getClassIfDefined("scala.reflect.macros.BlackboxMacro") // defined in scala-reflect.jar, so we need to be careful def BlackboxMacroContextValue = BlackboxMacroClass.map(sym => getMemberValue(sym, nme.c)) diff --git a/src/reflect/scala/reflect/runtime/JavaUniverseForce.scala b/src/reflect/scala/reflect/runtime/JavaUniverseForce.scala index e8f20e4a83..0f41506382 100644 --- a/src/reflect/scala/reflect/runtime/JavaUniverseForce.scala +++ b/src/reflect/scala/reflect/runtime/JavaUniverseForce.scala @@ -318,7 +318,6 @@ trait JavaUniverseForce { self: runtime.JavaUniverse => definitions.MirrorClass definitions.TypeCreatorClass definitions.TreeCreatorClass - definitions.LiftableClass definitions.BlackboxMacroClass definitions.WhiteboxMacroClass definitions.BlackboxContextClass |