diff options
author | Rui Gonçalves <ruippeixotog@gmail.com> | 2016-11-12 21:07:08 +0000 |
---|---|---|
committer | Rui Gonçalves <ruippeixotog@gmail.com> | 2017-02-02 22:14:05 +0000 |
commit | 155d06a500f9855e16c06346e09b9ca5f0e0f910 (patch) | |
tree | 9f98ffa382b39f5f79fa61409c9044470887c4d7 /test | |
parent | fff17320448c9691851aa16897e2fa2d75e0f11a (diff) | |
download | scala-155d06a500f9855e16c06346e09b9ca5f0e0f910.tar.gz scala-155d06a500f9855e16c06346e09b9ca5f0e0f910.tar.bz2 scala-155d06a500f9855e16c06346e09b9ca5f0e0f910.zip |
SI-9507 Make Stream #:: and #::: allow type widening
Diffstat (limited to 'test')
-rw-r--r-- | test/junit/scala/collection/immutable/StreamTest.scala | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/junit/scala/collection/immutable/StreamTest.scala b/test/junit/scala/collection/immutable/StreamTest.scala index 7046525f37..61f7b792e8 100644 --- a/test/junit/scala/collection/immutable/StreamTest.scala +++ b/test/junit/scala/collection/immutable/StreamTest.scala @@ -117,4 +117,10 @@ class StreamTest { assert((0 #:: 1 #:: s) == (0 #:: 1 #:: s), "Cons of referentially identical streams should be equal (==)") assert((0 #:: 1 #:: s) equals (0 #:: 1 #:: s), "Cons of referentially identical streams should be equal (equals)") } + + @Test + def t9886: Unit = { + assertEquals(Stream(None, Some(1)), None #:: Stream(Some(1))) + assertEquals(Stream(None, Some(1)), Stream(None) #::: Stream(Some(1))) + } } |