diff options
author | Martin Odersky <odersky@gmail.com> | 2013-11-10 22:41:23 +0100 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2013-11-10 22:41:23 +0100 |
commit | d0d0d9faf75b9c98434a63fd8b239d02a78b628d (patch) | |
tree | a90786d2e58bddd27779f208c2d6d75e73e4d0d2 /tests/pos/Coder.scala | |
parent | 2be8e8e6c1b48597d221f6cfc11c5f3b6fc113b3 (diff) | |
download | dotty-d0d0d9faf75b9c98434a63fd8b239d02a78b628d.tar.gz dotty-d0d0d9faf75b9c98434a63fd8b239d02a78b628d.tar.bz2 dotty-d0d0d9faf75b9c98434a63fd8b239d02a78b628d.zip |
Dealias before add to constraint.
We need to dealias any bounds before adding it to the constraint because otherwise we might have added a constraint X <: X in disguise.
Diffstat (limited to 'tests/pos/Coder.scala')
-rw-r--r-- | tests/pos/Coder.scala | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/pos/Coder.scala b/tests/pos/Coder.scala index 3fcda1afd..a47dcf3c9 100644 --- a/tests/pos/Coder.scala +++ b/tests/pos/Coder.scala @@ -38,11 +38,12 @@ class Coder(words: List[String]) { def encode(number: String): Set[List[String]] = if (number.isEmpty) Set(Nil) else { - val xs = for { + val xs = (for { splitPoint <- 1 to number.length word <- wordsForNum(number take splitPoint) rest <- encode(number drop splitPoint) } yield word :: rest + ) xs.toSet } |