@@ -184,55 +184,6 @@ package object partest {
184184 vlog(allPropertiesString)
185185 }
186186
187- import scala .language .experimental .macros
188-
189- /**
190- * `trace("".isEmpty)` will return `true` and as a side effect print the following to standard out.
191- * {{{
192- * trace> "".isEmpty
193- * res: Boolean = true
194- *
195- * }}}
196- *
197- * An alternative to [[scala.tools.partest.ReplTest ]] that avoids the inconvenience of embedding
198- * test code in a string.
199- */
200- def trace [A ](a : A ) = macro traceImpl[A ]
201-
202- import scala .reflect .macros .BlackboxContext
203- def traceImpl [A : c.WeakTypeTag ](c : BlackboxContext )(a : c.Expr [A ]): c.Expr [A ] = {
204- import c .universe ._
205- import definitions ._
206-
207- // xeno.by: reify shouldn't be used explicitly before the final release of 2.10.0,
208- // because this impairs reflection refactorings
209- //
210- // val exprCode = c.literal(show(a.tree))
211- // val exprType = c.literal(show(a.actualType))
212- // reify {
213- // println(s"trace> ${exprCode.splice}\nres: ${exprType.splice} = ${a.splice}\n")
214- // a.splice
215- // }
216-
217- c.Expr (Block (
218- List (Apply (
219- Select (Ident (PredefModule ), TermName (" println" )),
220- List (Apply (
221- Select (Apply (
222- Select (Ident (ScalaPackage ), TermName (" StringContext" )),
223- List (
224- Literal (Constant (" trace> " )),
225- Literal (Constant (" \\ nres: " )),
226- Literal (Constant (" = " )),
227- Literal (Constant (" \\ n" )))),
228- TermName (" s" )),
229- List (
230- Literal (Constant (show(a.tree))),
231- Literal (Constant (show(a.actualType))),
232- a.tree))))),
233- a.tree))
234- }
235-
236187 def isPartestTerse = NestUI .isTerse
237188 def isPartestDebug = NestUI .isDebug
238189 def isPartestVerbose = NestUI .isVerbose
0 commit comments