aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/transform/TypeUtils.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2015-05-29 11:15:04 +0200
committerMartin Odersky <odersky@gmail.com>2015-06-01 15:04:44 +0200
commit6cdb3d45bf2b0b9ebfad73991be37a80f0c8639f (patch)
treeae0d9e22bdc192681ece64fe0120cf9e39b8899d /src/dotty/tools/dotc/transform/TypeUtils.scala
parent4f0af8ec7916503d878712eb99a7a64ea8191bc8 (diff)
downloaddotty-6cdb3d45bf2b0b9ebfad73991be37a80f0c8639f.tar.gz
dotty-6cdb3d45bf2b0b9ebfad73991be37a80f0c8639f.tar.bz2
dotty-6cdb3d45bf2b0b9ebfad73991be37a80f0c8639f.zip
Make ensureMethodic work after erasure.
Previously it didn't, because it created an ExprType, which is illegal after erasure.
Diffstat (limited to 'src/dotty/tools/dotc/transform/TypeUtils.scala')
-rw-r--r--src/dotty/tools/dotc/transform/TypeUtils.scala2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/dotty/tools/dotc/transform/TypeUtils.scala b/src/dotty/tools/dotc/transform/TypeUtils.scala
index c01b6478c..d474c77b4 100644
--- a/src/dotty/tools/dotc/transform/TypeUtils.scala
+++ b/src/dotty/tools/dotc/transform/TypeUtils.scala
@@ -29,6 +29,6 @@ class TypeUtils(val self: Type) extends AnyVal {
def ensureMethodic(implicit ctx: Context): Type = self match {
case self: MethodicType => self
- case _ => ExprType(self)
+ case _ => if (ctx.erasedTypes) MethodType(Nil, self) else ExprType(self)
}
}