summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/files/neg/bug2206.check5
-rw-r--r--test/files/neg/bug2206.scala15
-rw-r--r--test/files/neg/bug278.check5
-rw-r--r--test/files/neg/overload-msg.check13
-rw-r--r--test/files/neg/overload-msg.scala4
-rw-r--r--test/files/neg/typeerror.check2
6 files changed, 42 insertions, 2 deletions
diff --git a/test/files/neg/bug2206.check b/test/files/neg/bug2206.check
new file mode 100644
index 0000000000..3deb4d99ef
--- /dev/null
+++ b/test/files/neg/bug2206.check
@@ -0,0 +1,5 @@
+bug2206.scala:10: error: value f is not a member of o.A
+ Note: implicit method ax is not applicable here because it comes after the application point and it lacks an explicit result type
+ a.f()
+ ^
+one error found
diff --git a/test/files/neg/bug2206.scala b/test/files/neg/bug2206.scala
new file mode 100644
index 0000000000..cd2ec225e9
--- /dev/null
+++ b/test/files/neg/bug2206.scala
@@ -0,0 +1,15 @@
+object o {
+ class A
+
+ class AX {
+ def f() { }
+ }
+
+ import Implicits._
+ val a = new A
+ a.f()
+
+ object Implicits {
+ implicit def ax(a: A) = new AX
+ }
+} \ No newline at end of file
diff --git a/test/files/neg/bug278.check b/test/files/neg/bug278.check
index a3d44f6508..ad0a97371e 100644
--- a/test/files/neg/bug278.check
+++ b/test/files/neg/bug278.check
@@ -1,4 +1,7 @@
-bug278.scala:5: error: overloaded method value a with alternatives => (C.this.A) => Unit <and> => () => Unit does not take type parameters
+bug278.scala:5: error: overloaded method value a with alternatives:
+ => (C.this.A) => Unit <and>
+ => () => Unit
+ does not take type parameters
a[A]
^
bug278.scala:4: error: method a is defined twice
diff --git a/test/files/neg/overload-msg.check b/test/files/neg/overload-msg.check
new file mode 100644
index 0000000000..780830bff9
--- /dev/null
+++ b/test/files/neg/overload-msg.check
@@ -0,0 +1,13 @@
+overload-msg.scala:3: error: overloaded method value + with alternatives:
+ (Double)Double <and>
+ (Float)Float <and>
+ (Long)Long <and>
+ (scala.Int)scala.Int <and>
+ (Char)scala.Int <and>
+ (Short)scala.Int <and>
+ (Byte)scala.Int <and>
+ (java.lang.String)java.lang.String
+ cannot be applied to (Int(in method f))
+ def f[Int](y: Int) = x + y
+ ^
+one error found
diff --git a/test/files/neg/overload-msg.scala b/test/files/neg/overload-msg.scala
new file mode 100644
index 0000000000..8715c156a2
--- /dev/null
+++ b/test/files/neg/overload-msg.scala
@@ -0,0 +1,4 @@
+// type parameter shadows actual type, massive overload error confuses.
+class A(x: Int) {
+ def f[Int](y: Int) = x + y
+}
diff --git a/test/files/neg/typeerror.check b/test/files/neg/typeerror.check
index 3e21a79ad5..3ce11dad8a 100644
--- a/test/files/neg/typeerror.check
+++ b/test/files/neg/typeerror.check
@@ -1,6 +1,6 @@
typeerror.scala:6: error: type mismatch;
found : Long(in method add)
- required: Long(in package scala)
+ required: scala.Long
else add2(x.head, y.head) :: add(x.tail, y.tail)
^
one error found