Skip to content
This repository was archived by the owner on Feb 20, 2019. It is now read-only.

Commit 1cb5176

Browse files
committed
Merge pull request #234 from scala/tidying
Making more names in generated code fully-qualified
2 parents 428594a + 6ac00aa commit 1cb5176

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

core/src/main/scala/pickling/Macros.scala

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,7 @@ trait UnpicklerMacros extends Macro with UnpickleMacros {
401401
import scala.pickling._
402402
import scala.pickling.ir._
403403
import scala.pickling.internal._
404-
def unpickle(tag: => FastTypeTag[_], reader: PReader): Any = $unpickleLogic
404+
def unpickle(tag: => scala.pickling.FastTypeTag[_], reader: scala.pickling.PReader): Any = $unpickleLogic
405405
}
406406
$unpicklerName
407407
"""
@@ -562,10 +562,10 @@ trait PickleMacros extends Macro {
562562
import scala.language.existentials
563563
import scala.pickling._
564564
import scala.pickling.internal._
565-
val picklee = $picklee
566-
GRL.lock()
565+
val picklee: $tpe = $picklee
566+
scala.pickling.internal.GRL.lock()
567567
$picklingLogic
568-
GRL.unlock()
568+
scala.pickling.internal.GRL.unlock()
569569
"""
570570
}
571571
}
@@ -628,12 +628,12 @@ trait UnpickleMacros extends Macro {
628628
})
629629
val runtimeDispatch = CaseDef(Ident(nme.WILDCARD), EmptyTree, q"""
630630
val tag = scala.pickling.FastTypeTag(typeString)
631-
Unpickler.genUnpickler($readerName.mirror, tag)
631+
scala.pickling.Unpickler.genUnpickler($readerName.mirror, tag)
632632
""")
633633

634634
q"""
635-
val customUnpickler = implicitly[Unpickler[$tpe]]
636-
if (customUnpickler.isInstanceOf[PicklerUnpicklerNotFound[_]] || customUnpickler.isInstanceOf[Generated]) {
635+
val customUnpickler = implicitly[scala.pickling.Unpickler[$tpe]]
636+
if (customUnpickler.isInstanceOf[scala.pickling.PicklerUnpicklerNotFound[_]] || customUnpickler.isInstanceOf[scala.pickling.Generated]) {
637637
${Match(q"typeString", compileTimeDispatch :+ refDispatch :+ runtimeDispatch)}
638638
} else {
639639
${Match(q"typeString", List(refDispatch) :+ customDispatch)}
@@ -643,7 +643,7 @@ trait UnpickleMacros extends Macro {
643643

644644
def abstractTypeDispatch =
645645
q"""
646-
val customUnpickler = implicitly[Unpickler[$tpe]]
646+
val customUnpickler = implicitly[scala.pickling.Unpickler[$tpe]]
647647
${Match(q"typeString", List(refDispatch) :+ customDispatch)}
648648
"""
649649

@@ -655,15 +655,15 @@ trait UnpickleMacros extends Macro {
655655
val unpickleeCleanup = if (isTopLevel && shouldBotherAboutCleaning(tpe)) q"clearUnpicklees()" else q""
656656

657657
q"""
658-
GRL.lock()
658+
scala.pickling.internal.GRL.lock()
659659
$readerName.hintTag(implicitly[scala.pickling.FastTypeTag[$tpe]])
660660
$staticHint
661661
val typeString = $readerName.beginEntryNoTag()
662662
val unpickler = $dispatchLogic
663663
val result = unpickler.unpickle({ scala.pickling.FastTypeTag(typeString) }, $readerName)
664664
$readerName.endEntry()
665665
$unpickleeCleanup
666-
GRL.unlock()
666+
scala.pickling.internal.GRL.unlock()
667667
result.asInstanceOf[$tpe]
668668
"""
669669
}

0 commit comments

Comments
 (0)