aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDmitry Petrashko <dark@d-d.me>2015-04-27 14:54:38 +0200
committerDmitry Petrashko <dark@d-d.me>2015-04-27 14:54:38 +0200
commit9ba09d426dcc3fa0e0fb8422df9722bc95b1d611 (patch)
tree2c4b5494c130fa490ffec41c76ee427dd19226c1 /src
parent1e9c012a0c61b2031ecaf11de3f2e99a5fdff7af (diff)
parent0ee9f234b41b46d98685330c26020ac815a6162d (diff)
downloaddotty-9ba09d426dcc3fa0e0fb8422df9722bc95b1d611.tar.gz
dotty-9ba09d426dcc3fa0e0fb8422df9722bc95b1d611.tar.bz2
dotty-9ba09d426dcc3fa0e0fb8422df9722bc95b1d611.zip
Merge pull request #491 from smarter/simplify/makeBridgeDef
Erasure#Typer: Document makeBridgeDef
Diffstat (limited to 'src')
-rw-r--r--src/dotty/tools/dotc/transform/Erasure.scala8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/dotty/tools/dotc/transform/Erasure.scala b/src/dotty/tools/dotc/transform/Erasure.scala
index 640d5f13e..79db568b8 100644
--- a/src/dotty/tools/dotc/transform/Erasure.scala
+++ b/src/dotty/tools/dotc/transform/Erasure.scala
@@ -503,6 +503,14 @@ object Erasure extends TypeTestsCasts{
traverse(newStats, oldStats)
}
+ /** Create a bridge DefDef which overrides a parent method.
+ *
+ * @param newDef The DefDef which needs bridging because its signature
+ * does not match the parent method signature
+ * @param parentSym A symbol corresponding to the parent method to override
+ * @return A new DefDef whose signature matches the parent method
+ * and whose body only contains a call to newDef
+ */
def makeBridgeDef(newDef: tpd.DefDef, parentSym: Symbol)(implicit ctx: Context): tpd.DefDef = {
val newDefSym = newDef.symbol
val currentClass = newDefSym.owner.asClass