summaryrefslogtreecommitdiff
path: root/test/files/neg/bug4158.check
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2011-01-18 18:54:27 +0000
committerPaul Phillips <paulp@improving.org>2011-01-18 18:54:27 +0000
commit8c713da3d02131bb3931c152a6bda9785e1f464e (patch)
tree9f9372144f22356be4dc2ab41d93218485203f68 /test/files/neg/bug4158.check
parent98de3e5bad0e670fbe2e0ea6d511dc57b282f332 (diff)
downloadscala-8c713da3d02131bb3931c152a6bda9785e1f464e.tar.gz
scala-8c713da3d02131bb3931c152a6bda9785e1f464e.tar.bz2
scala-8c713da3d02131bb3931c152a6bda9785e1f464e.zip
What is, I think, the only possible solution to...
What is, I think, the only possible solution to bug #4158 given the current ways of controlling implicits. Let's just be glad there's one instead of zero. Closes #4158, review by moors.
Diffstat (limited to 'test/files/neg/bug4158.check')
-rw-r--r--test/files/neg/bug4158.check19
1 files changed, 19 insertions, 0 deletions
diff --git a/test/files/neg/bug4158.check b/test/files/neg/bug4158.check
new file mode 100644
index 0000000000..0d9873dc32
--- /dev/null
+++ b/test/files/neg/bug4158.check
@@ -0,0 +1,19 @@
+bug4158.scala:3: error: type mismatch;
+ found : Null(null)
+ required: Int
+Note that implicit conversions are not applicable because they are ambiguous:
+ both method Integer2intNullConflict in class LowPriorityImplicits of type (x: Null)Int
+ and method Integer2int in object Predef of type (x: java.lang.Integer)Int
+ are possible conversion functions from Null(null) to Int
+ var y = null: Int
+ ^
+bug4158.scala:2: error: type mismatch;
+ found : Null(null)
+ required: Int
+Note that implicit conversions are not applicable because they are ambiguous:
+ both method Integer2intNullConflict in class LowPriorityImplicits of type (x: Null)Int
+ and method Integer2int in object Predef of type (x: java.lang.Integer)Int
+ are possible conversion functions from Null(null) to Int
+ var x: Int = null
+ ^
+two errors found