summaryrefslogtreecommitdiff
path: root/test/files/neg
diff options
context:
space:
mode:
authorAdriaan Moors <adriaan.moors@typesafe.com>2012-11-25 13:52:36 -0800
committerAdriaan Moors <adriaan.moors@typesafe.com>2012-11-25 13:52:36 -0800
commit9afc00c0408e49a111f381334cbdb7fcdaa4f340 (patch)
tree9807c35aa0bc818bf487a2c93bd577e37e1adce0 /test/files/neg
parent889ceade520ae5d2d1485edf2826696fa91a0e91 (diff)
parentf0e9237834d00ea9e27937e44dc8b8382be32db6 (diff)
downloadscala-9afc00c0408e49a111f381334cbdb7fcdaa4f340.tar.gz
scala-9afc00c0408e49a111f381334cbdb7fcdaa4f340.tar.bz2
scala-9afc00c0408e49a111f381334cbdb7fcdaa4f340.zip
Merge pull request #1664 from paulp/merge-2.10.x-master
Merge 2.10.x into master.
Diffstat (limited to 'test/files/neg')
-rw-r--r--test/files/neg/t5148.check10
-rw-r--r--test/files/neg/t6663.check6
-rw-r--r--test/files/neg/t6663.scala19
3 files changed, 33 insertions, 2 deletions
diff --git a/test/files/neg/t5148.check b/test/files/neg/t5148.check
index 6edfdf2b1e..25107c4dbe 100644
--- a/test/files/neg/t5148.check
+++ b/test/files/neg/t5148.check
@@ -1,3 +1,9 @@
-error: bad symbolic reference to value global in class IMain - referenced from t5148.scala (a classfile may be missing)
-error: bad symbolic reference to value memberHandlers in class IMain - referenced from t5148.scala (a classfile may be missing)
+error: bad symbolic reference. A signature in Imports.class refers to term global
+in class scala.tools.nsc.interpreter.IMain which is not available.
+It may be completely missing from the current classpath, or the version on
+the classpath might be incompatible with the version used when compiling Imports.class.
+error: bad symbolic reference. A signature in Imports.class refers to term memberHandlers
+in class scala.tools.nsc.interpreter.IMain which is not available.
+It may be completely missing from the current classpath, or the version on
+the classpath might be incompatible with the version used when compiling Imports.class.
two errors found
diff --git a/test/files/neg/t6663.check b/test/files/neg/t6663.check
new file mode 100644
index 0000000000..aa4faa4a46
--- /dev/null
+++ b/test/files/neg/t6663.check
@@ -0,0 +1,6 @@
+t6663.scala:16: error: type mismatch;
+ found : String
+ required: Int
+ var v = new C(42).foo[String].get :Int
+ ^
+one error found
diff --git a/test/files/neg/t6663.scala b/test/files/neg/t6663.scala
new file mode 100644
index 0000000000..4a358dfbc5
--- /dev/null
+++ b/test/files/neg/t6663.scala
@@ -0,0 +1,19 @@
+import language.dynamics
+
+class C(v: Any) extends Dynamic {
+ def selectDynamic[T](n: String): Option[T] = Option(v.asInstanceOf[T])
+ def applyDynamic[T](n: String)(): Option[T] = Option(v.asInstanceOf[T])
+}
+
+object Test extends App {
+ // this should be converted to
+ // C(42).selectDynamic[String]("foo").get
+ // causing a compile error.
+
+ // but, before fixing SI-6663, became
+ // C(42).selectDynamic("foo").get, ignoring
+ // the [String] type parameter
+ var v = new C(42).foo[String].get :Int
+ println(v)
+}
+