summaryrefslogtreecommitdiff
path: root/test/files/neg/t8849.check
diff options
context:
space:
mode:
authorViktor Klang <viktor.klang@gmail.com>2014-10-10 01:52:26 +0200
committerViktor Klang <viktor.klang@gmail.com>2014-10-20 23:55:49 +0200
commit44953dcb08fc5dd92e423a56bd42bcc32757aaef (patch)
tree416f3877b1bdc849d0e67383d68b3dceee2ac11c /test/files/neg/t8849.check
parentfa0743c32338f147eaf7a5d69566bbc15d193f85 (diff)
downloadscala-44953dcb08fc5dd92e423a56bd42bcc32757aaef.tar.gz
scala-44953dcb08fc5dd92e423a56bd42bcc32757aaef.tar.bz2
scala-44953dcb08fc5dd92e423a56bd42bcc32757aaef.zip
SI-8849 Makes `ExecutionContext.Implicits.global` ambiguous
There was an unfortunate side-effect from having `Implicits.global` be of type `ExecutionContextExecutor`; it is more specific than `ExecutionContext`, as such it would be picked over other `ExecutionContexts` in the implicit scope.
Diffstat (limited to 'test/files/neg/t8849.check')
-rw-r--r--test/files/neg/t8849.check7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/files/neg/t8849.check b/test/files/neg/t8849.check
new file mode 100644
index 0000000000..15b00aee8b
--- /dev/null
+++ b/test/files/neg/t8849.check
@@ -0,0 +1,7 @@
+t8849.scala:8: error: ambiguous implicit values:
+ both value global in object Implicits of type => scala.concurrent.ExecutionContext
+ and value dummy of type scala.concurrent.ExecutionContext
+ match expected type scala.concurrent.ExecutionContext
+ require(implicitly[ExecutionContext] eq dummy)
+ ^
+one error found