Browse files

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
  • Loading branch information...
1 parent a09914c commit 495b7b873b65b5847ddcde40e4ed92c7119ed448 @densh densh committed Dec 9, 2013
View
2 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()
View
4 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)
}
View
1 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))
View
1 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

0 comments on commit 495b7b8

Please sign in to comment.