Skip to content

Commit 495b7b8

Browse files
committed
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
1 parent a09914c commit 495b7b8

File tree

4 files changed

+3
-5
lines changed

4 files changed

+3
-5
lines changed

src/compiler/scala/tools/reflect/quasiquotes/Holes.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ trait Holes { self: Quasiquotes =>
7373
}
7474

7575
class ApplyHole(card: Cardinality, splicee: Tree) extends Hole {
76-
val (strippedTpe: Type, tpe: Type) = {
76+
val (strippedTpe, tpe): (Type, Type) = {
7777
if (stripIterable(splicee.tpe)._1.value < card.value) cantSplice()
7878
val (_, strippedTpe) = stripIterable(splicee.tpe, limit = Some(card))
7979
if (isBottomType(strippedTpe)) cantSplice()

src/reflect/scala/reflect/internal/BuildUtils.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ trait BuildUtils { self: SymbolTable =>
212212
case Nil :: (tail @ ((head :: _) :: _)) if head.mods.isImplicit => tail
213213
case other => other
214214
}
215-
// undo flag modifications by mergeing flag info from constructor args and fieldDefs
215+
// undo flag modifications by merging flag info from constructor args and fieldDefs
216216
val modsMap = fieldDefs.map { case ValDef(mods, name, _, _) => name -> mods }.toMap
217217
def ctorArgsCorrespondToFields = vparamssRestoredImplicits.flatten.forall { vd => modsMap.contains(vd.name) }
218218
if (!ctorArgsCorrespondToFields) None
@@ -394,7 +394,7 @@ trait BuildUtils { self: SymbolTable =>
394394
object SyntacticFunction extends SyntacticFunctionExtractor {
395395
def apply(params: List[Tree], body: Tree): Tree = {
396396
val params0 :: Nil = mkVparamss(params :: Nil)
397-
require(params0.forall { _.rhs.isEmpty }, "anonymous functions don't support default values")
397+
require(params0.forall { _.rhs.isEmpty }, "anonymous functions don't support parameters with default values")
398398
Function(params0, body)
399399
}
400400

src/reflect/scala/reflect/internal/Definitions.scala

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -481,7 +481,6 @@ trait Definitions extends api.StandardDefinitions {
481481

482482
lazy val TypeCreatorClass = getClassIfDefined("scala.reflect.api.TypeCreator") // defined in scala-reflect.jar, so we need to be careful
483483
lazy val TreeCreatorClass = getClassIfDefined("scala.reflect.api.TreeCreator") // defined in scala-reflect.jar, so we need to be careful
484-
lazy val LiftableClass = NoSymbol
485484

486485
lazy val BlackboxMacroClass = getClassIfDefined("scala.reflect.macros.BlackboxMacro") // defined in scala-reflect.jar, so we need to be careful
487486
def BlackboxMacroContextValue = BlackboxMacroClass.map(sym => getMemberValue(sym, nme.c))

src/reflect/scala/reflect/runtime/JavaUniverseForce.scala

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,6 @@ trait JavaUniverseForce { self: runtime.JavaUniverse =>
318318
definitions.MirrorClass
319319
definitions.TypeCreatorClass
320320
definitions.TreeCreatorClass
321-
definitions.LiftableClass
322321
definitions.BlackboxMacroClass
323322
definitions.WhiteboxMacroClass
324323
definitions.BlackboxContextClass

0 commit comments

Comments
 (0)