aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/transform/TypeUtils.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2014-08-17 13:00:59 +0200
committerMartin Odersky <odersky@gmail.com>2014-08-17 13:00:59 +0200
commit58d4706463b08f2e448c3021adad809e6046e0fe (patch)
treeacee1e319a6c4ffcb9feef976cdfdd78a2568ea6 /src/dotty/tools/dotc/transform/TypeUtils.scala
parentf91f030290ac817888a6249d91118f42b560ab87 (diff)
downloaddotty-58d4706463b08f2e448c3021adad809e6046e0fe.tar.gz
dotty-58d4706463b08f2e448c3021adad809e6046e0fe.tar.bz2
dotty-58d4706463b08f2e448c3021adad809e6046e0fe.zip
Split Nullarify functionality to ElimByName, Erasure
New phase ElimByName elimintaes by-name parameters. All other occurrences of parameterless methods and ExprTypes are eliminated in erasure. The reason for the split like this is that it is very hard for Nullarify to determine when to insert ()'s. The logic for this is fragile because we need to look at previous denotations which might not exist (before splitter) or might result from a merge between parameterless and nullary methods. In Erasure the same is much simpler to achieve.
Diffstat (limited to 'src/dotty/tools/dotc/transform/TypeUtils.scala')
-rw-r--r--src/dotty/tools/dotc/transform/TypeUtils.scala7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/dotty/tools/dotc/transform/TypeUtils.scala b/src/dotty/tools/dotc/transform/TypeUtils.scala
index d07930661..a07ac9041 100644
--- a/src/dotty/tools/dotc/transform/TypeUtils.scala
+++ b/src/dotty/tools/dotc/transform/TypeUtils.scala
@@ -16,8 +16,8 @@ object TypeUtils {
}
-/** A decorator that provides methods for type transformations
- * that are needed in the transofmer pipeline (not needed right now)
+/** A decorator that provides methods on types
+ * that are needed in the transformer pipeline.
*/
class TypeUtils(val self: Type) extends AnyVal {
@@ -26,5 +26,4 @@ class TypeUtils(val self: Type) extends AnyVal {
def isPrimitiveValueType(implicit ctx: Context): Boolean =
self.classSymbol.isPrimitiveValueClass
-
- }
+}