Skip to content

Fix #3875 and other details #3879

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jan 21, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion compiler/src/dotty/tools/dotc/parsing/Scanners.scala
Original file line number Diff line number Diff line change
Expand Up @@ -950,7 +950,7 @@ object Scanners {
setStrVal()
} else {
token = op
strVal = name.toString
strVal = if (name != null) name.toString else null
litBuf.clear()
}
}
Expand Down
4 changes: 3 additions & 1 deletion library/src/scala/quoted/Liftable.scala
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ abstract class Liftable[T] {
*/
object Liftable {

final class ConstantExpr[T] private[Liftable](val value: T) extends Expr[T]
final class ConstantExpr[T] private[Liftable](val value: T) extends Expr[T] {
override def toString: String = s"Expr($value)"
}

implicit def BooleanIsLiftable: Liftable[Boolean] = (x: Boolean) => new ConstantExpr(x)
implicit def ByteLiftable: Liftable[Byte] = (x: Byte) => new ConstantExpr(x)
Expand Down
2 changes: 1 addition & 1 deletion library/src/scala/quoted/TastyExpr.scala
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ import scala.runtime.quoted.Unpickler.Pickled

/** An Expr backed by a pickled TASTY tree */
final case class TastyExpr[T](tasty: Pickled, args: Seq[Any]) extends Expr[T] with TastyQuoted {
override def toString(): String = s"TastyExpr(<TASTY>, $args)"
override def toString(): String = s"Expr(<pickled>)"
}
2 changes: 1 addition & 1 deletion library/src/scala/quoted/TastyType.scala
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ import scala.runtime.quoted.Unpickler.Pickled

/** A Type backed by a pickled TASTY tree */
final case class TastyType[T](tasty: Pickled, args: Seq[Any]) extends Type[T] with TastyQuoted {
override def toString(): String = s"TastyType(<TASTY>, $args)"
override def toString(): String = s"Type(<pickled>)"
}
4 changes: 3 additions & 1 deletion library/src/scala/quoted/Type.scala
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ abstract class Type[T] extends Quoted {
/** Some basic type tags, currently incomplete */
object Type {

class TaggedPrimitive[T] private[Type] (implicit val ct: ClassTag[T]) extends Type[T]
final class TaggedPrimitive[T] private[Type] (implicit val ct: ClassTag[T]) extends Type[T] {
override def toString: String = s"Type($ct)"
}

implicit def UnitTag: Type[Unit] = new TaggedPrimitive[Unit]
implicit def BooleanTag: Type[Boolean] = new TaggedPrimitive[Boolean]
Expand Down