aboutsummaryrefslogtreecommitdiff
path: root/tests/pos/Patterns.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 /tests/pos/Patterns.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 'tests/pos/Patterns.scala')
-rw-r--r--tests/pos/Patterns.scala6
1 files changed, 3 insertions, 3 deletions
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
+}