diff options
author | Martin Odersky <odersky@gmail.com> | 2014-05-30 14:37:40 +0200 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2014-05-30 14:37:40 +0200 |
commit | 05668169eca68bbdc777fbf698f92e256f8e50a9 (patch) | |
tree | da628f1f17fbc30e0183c95546caad4cef2f4039 /tests/pos/t2504.scala | |
parent | 3b247c34a4c8959b638c61b116635d6c7e80403a (diff) | |
download | dotty-05668169eca68bbdc777fbf698f92e256f8e50a9.tar.gz dotty-05668169eca68bbdc777fbf698f92e256f8e50a9.tar.bz2 dotty-05668169eca68bbdc777fbf698f92e256f8e50a9.zip |
Fix of t2504
Another problem where we need to insert an implicit on the result type of complex operation.
Two additions: (1) If adapt fails, we now try with a weaker FunProto without result type, thus
allowing for an additional implicit cpmversion on the result. (2) An Application in a committable
context will not fail if the result type does not match the expected one. The problem will be
simply deferred in that case.
Diffstat (limited to 'tests/pos/t2504.scala')
-rwxr-xr-x | tests/pos/t2504.scala | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/pos/t2504.scala b/tests/pos/t2504.scala new file mode 100755 index 000000000..72117174c --- /dev/null +++ b/tests/pos/t2504.scala @@ -0,0 +1,6 @@ +object Test { + val zs = Array("abc") + val ys: Iterable[_] = Array("abc") + val xs = Array("abc") + xs sameElements Array("abc") +} |