Skip to content

Commit 2b10c0b

Browse files
committed
Add missing implementations
1 parent 6876240 commit 2b10c0b

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

compiler/src/dotty/tools/dotc/tasty/TastyImpl.scala

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

7171
def PackageClauseDeco(x: PackageClause): AbstractPackageClause = new AbstractPackageClause {
72-
override def definition: Definition = ???
72+
def definition(implicit ctx: Context): Definition = FromSymbol.packageDef(x.symbol)
7373
}
7474

7575
// ----- Statements -----------------------------------------------
@@ -544,7 +544,9 @@ object TastyImpl extends scala.tasty.Tasty {
544544

545545
type TypeBoundsTree = tpd.TypeBoundsTree
546546

547-
def TypeBoundsTreeDeco(x: TypeBoundsTree): AbstractTypeBoundsTree = ???
547+
def TypeBoundsTreeDeco(x: TypeBoundsTree): AbstractTypeBoundsTree = new AbstractTypeBoundsTree {
548+
def tpe(implicit ctx: Context): TypeBounds = x.tpe.bounds
549+
}
548550

549551
def typeBoundsTreeClassTag: ClassTag[TypeBoundsTree] = implicitly[ClassTag[TypeBoundsTree]]
550552

library/src/scala/tasty/Tasty.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ abstract class Tasty {
5656
}
5757

5858
trait AbstractPackageClause {
59-
def definition: Definition
59+
def definition(implicit ctx: Context): Definition
6060
}
6161
implicit def PackageClauseDeco(x: PackageClause): AbstractPackageClause
6262

@@ -411,7 +411,7 @@ abstract class Tasty {
411411
type TypeBoundsTree <: TypeOrBoundsTree
412412

413413
trait AbstractTypeBoundsTree {
414-
def tpe: TypeBounds
414+
def tpe(implicit ctx: Context): TypeBounds
415415
}
416416
implicit def TypeBoundsTreeDeco(x: TypeBoundsTree): AbstractTypeBoundsTree
417417

0 commit comments

Comments
 (0)