aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDmitry Petrashko <dmitry.petrashko@gmail.com>2014-12-12 15:04:58 +0100
committerDmitry Petrashko <dmitry.petrashko@gmail.com>2014-12-12 15:04:58 +0100
commitc327c4cc95270a717b799be05d5d9b19c671050e (patch)
tree7142b613635bc34bbb4da3a33f06368d3a148cb4 /src
parenta9867e0282b2a4356d458421d7f7e89f8350de7e (diff)
downloaddotty-c327c4cc95270a717b799be05d5d9b19c671050e.tar.gz
dotty-c327c4cc95270a717b799be05d5d9b19c671050e.tar.bz2
dotty-c327c4cc95270a717b799be05d5d9b19c671050e.zip
Make TreeTransform type check in dotty. There's no magic type behind getClass in dotty.
Diffstat (limited to 'src')
-rw-r--r--src/dotty/tools/dotc/transform/TreeTransform.scala8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/dotty/tools/dotc/transform/TreeTransform.scala b/src/dotty/tools/dotc/transform/TreeTransform.scala
index bb61bedf1..4dba26870 100644
--- a/src/dotty/tools/dotc/transform/TreeTransform.scala
+++ b/src/dotty/tools/dotc/transform/TreeTransform.scala
@@ -218,7 +218,7 @@ object TreeTransforms {
* i <= j
* j == transforms.length || transform(j) defines a non-default method with given `name`
*/
- private def index(transformations: Array[Class[_ <: TreeTransform]], name: String): Array[Int] = {
+ private def index(transformations: Array[Class[_]], name: String): Array[Int] = {
val len = transformations.length
val next = new Array[Int](len + 1)
var nextTransform: Int = len
@@ -240,7 +240,7 @@ object TreeTransforms {
next
}
- private def indexUpdate(prev: Array[Int], changedTansformation: Class[_ <: TreeTransform], index: Int, name: String, copy: Boolean = true) = {
+ private def indexUpdate(prev: Array[Int], changedTansformation: Class[_], index: Int, name: String, copy: Boolean = true) = {
val isDefinedNow = hasRedefinedMethod(changedTansformation, name)
val wasDefinedBefore = prev(index) == index
if (isDefinedNow == wasDefinedBefore) prev
@@ -259,7 +259,7 @@ object TreeTransforms {
}
}
- def this(transformations: Array[Class[_ <: TreeTransform]]) = {
+ def this(transformations: Array[Class[_]]) = {
this()
nxPrepIdent = index(transformations, "prepareForIdent")
nxPrepSelect = index(transformations, "prepareForSelect")
@@ -330,7 +330,7 @@ object TreeTransforms {
}
def this(transformations: Array[TreeTransform]) = {
- this(transformations.map(_.getClass))
+ this(transformations.map(_.getClass).asInstanceOf[Array[Class[_]]])
}
def this(prev: NXTransformations, changedTansformation: TreeTransform, transformationIndex: Int, reuse: Boolean = false) = {