Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 2b8b1ec

Browse files
committedMay 28, 2018
Add missing implementations
1 parent 0b55397 commit 2b8b1ec

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed
 

‎compiler/src/dotty/tools/dotc/tastyreflect/TastyImpl.scala

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ object TastyImpl extends scala.tasty.Tasty {
8282
}
8383

8484
def PackageClauseDeco(x: PackageClause): AbstractPackageClause = new AbstractPackageClause {
85-
override def definition: Definition = ???
85+
def definition(implicit ctx: Context): Definition = FromSymbol.packageDef(x.symbol)
8686
}
8787

8888
// ----- Statements -----------------------------------------------
@@ -589,7 +589,9 @@ object TastyImpl extends scala.tasty.Tasty {
589589

590590
type TypeBoundsTree = tpd.TypeBoundsTree
591591

592-
def TypeBoundsTreeDeco(x: TypeBoundsTree): AbstractTypeBoundsTree = ???
592+
def TypeBoundsTreeDeco(x: TypeBoundsTree): AbstractTypeBoundsTree = new AbstractTypeBoundsTree {
593+
def tpe(implicit ctx: Context): TypeBounds = x.tpe.bounds
594+
}
593595

594596
def typeBoundsTreeClassTag: ClassTag[TypeBoundsTree] = implicitly[ClassTag[TypeBoundsTree]]
595597

‎library/src/scala/tasty/Tasty.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ abstract class Tasty { tasty =>
6868
}
6969

7070
trait AbstractPackageClause {
71-
def definition: Definition
71+
def definition(implicit ctx: Context): Definition
7272
}
7373
implicit def PackageClauseDeco(x: PackageClause): AbstractPackageClause
7474

@@ -426,7 +426,7 @@ abstract class Tasty { tasty =>
426426
type TypeBoundsTree <: TypeOrBoundsTree
427427

428428
trait AbstractTypeBoundsTree {
429-
def tpe: TypeBounds
429+
def tpe(implicit ctx: Context): TypeBounds
430430
}
431431
implicit def TypeBoundsTreeDeco(x: TypeBoundsTree): AbstractTypeBoundsTree
432432

0 commit comments

Comments
 (0)
Please sign in to comment.