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 {
950
950
setStrVal()
951
951
} else {
952
952
token = op
953
- strVal = name.toString
953
+ strVal = if ( name != null ) name .toString else null
954
954
litBuf.clear()
955
955
}
956
956
}
Original file line number Diff line number Diff line change @@ -14,7 +14,9 @@ abstract class Liftable[T] {
14
14
*/
15
15
object Liftable {
16
16
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
+ }
18
20
19
21
implicit def BooleanIsLiftable : Liftable [Boolean ] = (x : Boolean ) => new ConstantExpr (x)
20
22
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
4
4
5
5
/** An Expr backed by a pickled TASTY tree */
6
6
final 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> )"
8
8
}
Original file line number Diff line number Diff line change @@ -4,5 +4,5 @@ import scala.runtime.quoted.Unpickler.Pickled
4
4
5
5
/** A Type backed by a pickled TASTY tree */
6
6
final 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> )"
8
8
}
Original file line number Diff line number Diff line change @@ -9,7 +9,9 @@ abstract class Type[T] extends Quoted {
9
9
/** Some basic type tags, currently incomplete */
10
10
object Type {
11
11
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
+ }
13
15
14
16
implicit def UnitTag : Type [Unit ] = new TaggedPrimitive [Unit ]
15
17
implicit def BooleanTag : Type [Boolean ] = new TaggedPrimitive [Boolean ]
You can’t perform that action at this time.
0 commit comments