Skip to content

Commit 5b80612

Browse files
committed
Reformat some code handling quotes
1 parent 2ad0877 commit 5b80612

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

compiler/src/dotty/tools/dotc/transform/ReifyQuotes.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,10 +146,10 @@ class ReifyQuotes extends MacroTransformWithImplicits with InfoTransformer {
146146
}
147147

148148
/** We are in a `~(...)` context that is not shadowed by a nested `'(...)` */
149-
def inSplice = outer != null && !inQuote
149+
def inSplice: Boolean = outer != null && !inQuote
150150

151151
/** We are not in a `~(...)` or a `'(...)` */
152-
def isRoot = outer == null
152+
def isRoot: Boolean = outer == null
153153

154154
/** A map from type ref T to expressions of type `quoted.Type[T]`".
155155
* These will be turned into splices using `addTags` and represent type variables

compiler/src/dotty/tools/dotc/transform/Splicer.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ object Splicer {
9292
s"""Failed to evaluate inlined quote.
9393
| Caused by ${ex.getClass}: ${if (ex.getMessage == null) "" else ex.getMessage}
9494
| ${ex.getStackTrace.takeWhile(_.getClassName != "dotty.tools.dotc.transform.Splicer$").init.mkString("\n ")}
95-
""".stripMargin
95+
""".stripMargin
9696
ctx.error(msg, pos)
9797
EmptyTree
9898
}

library/src/scala/quoted/Type.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ object Type {
3131
object Types {
3232
/** A Type backed by a pickled TASTY tree */
3333
final class TastyType[T](val tasty: Pickled, val args: Seq[Any]) extends Type[T] {
34-
override def toString(): String = s"Type(<pickled>)"
34+
override def toString(): String = s"Type(<pickled tasty>)"
3535
}
3636

3737
/** An Type backed by a value */
@@ -41,6 +41,6 @@ object Types {
4141

4242
/** An Type backed by a tree */
4343
final class TreeType[Tree](val typeTree: Tree) extends quoted.Type[Any] {
44-
override def toString: String = s"Type(<raw>)"
44+
override def toString: String = s"Type(<tasty tree>)"
4545
}
4646
}

0 commit comments

Comments
 (0)