aboutsummaryrefslogtreecommitdiff
path: root/tests/neg
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2017-02-25 18:28:12 +0100
committerMartin Odersky <odersky@gmail.com>2017-02-27 15:45:48 +0100
commit1aa4b56c4813117f3be3a725c404c242eccefe10 (patch)
tree2fd534f987da9f0ac6410ccc3b752e1766546bf6 /tests/neg
parentd0162aed64def280af8aa812514d101c1563fc28 (diff)
downloaddotty-1aa4b56c4813117f3be3a725c404c242eccefe10.tar.gz
dotty-1aa4b56c4813117f3be3a725c404c242eccefe10.tar.bz2
dotty-1aa4b56c4813117f3be3a725c404c242eccefe10.zip
Don't chain implicit conversions
When inferring a view, we are not allowed to use another implicit conversion to adapt its result. Fixing this revealed another problem where we have to re-enable implicit conversions when pre-typing arguments in overloading resolution.
Diffstat (limited to 'tests/neg')
-rw-r--r--tests/neg/i2030.scala5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/neg/i2030.scala b/tests/neg/i2030.scala
new file mode 100644
index 000000000..2d049f4e6
--- /dev/null
+++ b/tests/neg/i2030.scala
@@ -0,0 +1,5 @@
+// This used to take ~12s, the check should be that
+// it runs in reasonable time (i.e. instantaneous).
+object a {
+ val x: String | Int = 'a // error
+}