File tree Expand file tree Collapse file tree 5 files changed +9
-5
lines changed
compiler/src/dotty/tools/dotc/parsing Expand file tree Collapse file tree 5 files changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -950,7 +950,7 @@ object Scanners {
950950 setStrVal()
951951 } else {
952952 token = op
953- strVal = name.toString
953+ strVal = if ( name != null ) name .toString else null
954954 litBuf.clear()
955955 }
956956 }
Original file line number Diff line number Diff line change @@ -14,7 +14,9 @@ abstract class Liftable[T] {
1414 */
1515object Liftable {
1616
17- final class ConstantExpr [T ] private [Liftable ](val value : T ) extends Expr [T ]
17+ final class ConstantExpr [T ] private [Liftable ](val value : T ) extends Expr [T ] {
18+ override def toString : String = s " Expr( $value) "
19+ }
1820
1921 implicit def BooleanIsLiftable : Liftable [Boolean ] = (x : Boolean ) => new ConstantExpr (x)
2022 implicit def ByteLiftable : Liftable [Byte ] = (x : Byte ) => new ConstantExpr (x)
Original file line number Diff line number Diff line change @@ -4,5 +4,5 @@ import scala.runtime.quoted.Unpickler.Pickled
44
55/** An Expr backed by a pickled TASTY tree */
66final case class TastyExpr [T ](tasty : Pickled , args : Seq [Any ]) extends Expr [T ] with TastyQuoted {
7- override def toString (): String = s " TastyExpr(<TASTY>, $args ) "
7+ override def toString (): String = s " Expr(<pickled> )"
88}
Original file line number Diff line number Diff line change @@ -4,5 +4,5 @@ import scala.runtime.quoted.Unpickler.Pickled
44
55/** A Type backed by a pickled TASTY tree */
66final case class TastyType [T ](tasty : Pickled , args : Seq [Any ]) extends Type [T ] with TastyQuoted {
7- override def toString (): String = s " TastyType(<TASTY>, $args ) "
7+ override def toString (): String = s " Type(<pickled> )"
88}
Original file line number Diff line number Diff line change @@ -9,7 +9,9 @@ abstract class Type[T] extends Quoted {
99/** Some basic type tags, currently incomplete */
1010object Type {
1111
12- class TaggedPrimitive [T ] private [Type ] (implicit val ct : ClassTag [T ]) extends Type [T ]
12+ final class TaggedPrimitive [T ] private [Type ] (implicit val ct : ClassTag [T ]) extends Type [T ] {
13+ override def toString : String = s " Type( $ct) "
14+ }
1315
1416 implicit def UnitTag : Type [Unit ] = new TaggedPrimitive [Unit ]
1517 implicit def BooleanTag : Type [Boolean ] = new TaggedPrimitive [Boolean ]
You can’t perform that action at this time.
0 commit comments