From 58d4706463b08f2e448c3021adad809e6046e0fe Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Sun, 17 Aug 2014 13:00:59 +0200 Subject: 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. --- tests/pos/Patterns.scala | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'tests/pos/Patterns.scala') diff --git a/tests/pos/Patterns.scala b/tests/pos/Patterns.scala index 4470eb232..f601b95a8 100644 --- a/tests/pos/Patterns.scala +++ b/tests/pos/Patterns.scala @@ -1,4 +1,4 @@ -object Patterns { +object Patterns {/* ('1', "1") match { case (digit, str) => true case _ => false @@ -25,7 +25,7 @@ object Patterns { def len[T](xs: List[T]): Int = xs match { case _ :: xs1 => 1 + len(xs1) case Nil => 0 - } + }*/ final def sameLength[T](xs: List[T], ys: List[T]): Boolean = xs match { case _ :: xs1 => @@ -35,4 +35,4 @@ object Patterns { } case _ => ys.isEmpty } -} \ No newline at end of file +} -- cgit v1.2.3