Skip to content

Commit a3acd9b

Browse files
committed
Adapt backend to changes in scalac: new symbols get positions and types.
1 parent 3cbec1a commit a3acd9b

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/dotty/tools/backend/jvm/DottyBackendInterface.scala

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,8 @@ class DottyBackendInterface()(implicit ctx: Context) extends BackendInterface{
105105
val NothingClass: Symbol = defn.NothingClass
106106
val NullClass: Symbol = defn.NullClass
107107
val ObjectClass: Symbol = defn.ObjectClass
108+
val Object_Type: Type = defn.ObjectType
109+
val Throwable_Type: Type = defn.ThrowableType
108110
val Object_isInstanceOf: Symbol = defn.Any_isInstanceOf
109111
val Object_asInstanceOf: Symbol = defn.Any_asInstanceOf
110112
val Object_equals: Symbol = defn.Any_equals
@@ -484,7 +486,9 @@ class DottyBackendInterface()(implicit ctx: Context) extends BackendInterface{
484486
def serialVUID: Option[Long] = None
485487

486488

487-
def freshLocal(cunit: CompilationUnit, name: String, pos: Position, flags: Flags): Symbol = ???
489+
def freshLocal(cunit: CompilationUnit, name: String, tpe: Type, pos: Position, flags: Flags): Symbol = {
490+
ctx.newSymbol(sym, name.toTermName, FlagSet(flags), tpe, NoSymbol, pos)
491+
}
488492

489493
def getter(clz: Symbol): Symbol = decorateSymbol(sym).getter
490494
def setter(clz: Symbol): Symbol = decorateSymbol(sym).setter

0 commit comments

Comments
 (0)