Skip to content

Commit 9ba09d4

Browse files
committed
Merge pull request #491 from smarter/simplify/makeBridgeDef
Erasure#Typer: Document makeBridgeDef
2 parents 1e9c012 + 0ee9f23 commit 9ba09d4

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/dotty/tools/dotc/transform/Erasure.scala

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -503,6 +503,14 @@ object Erasure extends TypeTestsCasts{
503503
traverse(newStats, oldStats)
504504
}
505505

506+
/** Create a bridge DefDef which overrides a parent method.
507+
*
508+
* @param newDef The DefDef which needs bridging because its signature
509+
* does not match the parent method signature
510+
* @param parentSym A symbol corresponding to the parent method to override
511+
* @return A new DefDef whose signature matches the parent method
512+
* and whose body only contains a call to newDef
513+
*/
506514
def makeBridgeDef(newDef: tpd.DefDef, parentSym: Symbol)(implicit ctx: Context): tpd.DefDef = {
507515
val newDefSym = newDef.symbol
508516
val currentClass = newDefSym.owner.asClass

0 commit comments

Comments
 (0)