summaryrefslogtreecommitdiff
path: root/test/files
diff options
context:
space:
mode:
authorAdriaan Moors <adriaan.moors@epfl.ch>2012-05-22 15:24:38 -0700
committerAdriaan Moors <adriaan.moors@epfl.ch>2012-05-22 15:24:38 -0700
commitee898dc56eb2722999f067d99349a98ac40ff601 (patch)
treea97d9b16efe33ce42bd41117686b6c24daeb6dfa /test/files
parentb801c8432dd5520f1564d3acd902baa47c6e2bd8 (diff)
parentf5df207f95087c38b2936429cf793d63f0b68c24 (diff)
downloadscala-ee898dc56eb2722999f067d99349a98ac40ff601.tar.gz
scala-ee898dc56eb2722999f067d99349a98ac40ff601.tar.bz2
scala-ee898dc56eb2722999f067d99349a98ac40ff601.zip
Merge pull request #588 from retronym/ticket/5305
Don't hop to the first enclosing, non-silent context typing refinements
Diffstat (limited to 'test/files')
-rw-r--r--test/files/neg/t3614.check4
-rw-r--r--test/files/neg/t3614.scala3
-rw-r--r--test/files/pos/t3856.scala1
-rw-r--r--test/files/pos/t5305.scala13
4 files changed, 21 insertions, 0 deletions
diff --git a/test/files/neg/t3614.check b/test/files/neg/t3614.check
new file mode 100644
index 0000000000..5fdb5cbf1f
--- /dev/null
+++ b/test/files/neg/t3614.check
@@ -0,0 +1,4 @@
+t3614.scala:2: error: class type required but AnyRef{def a: <?>} found
+ def v = new ({ def a=0 })
+ ^
+one error found \ No newline at end of file
diff --git a/test/files/neg/t3614.scala b/test/files/neg/t3614.scala
new file mode 100644
index 0000000000..5b02cdf2b2
--- /dev/null
+++ b/test/files/neg/t3614.scala
@@ -0,0 +1,3 @@
+object t3614 {
+ def v = new ({ def a=0 })
+} \ No newline at end of file
diff --git a/test/files/pos/t3856.scala b/test/files/pos/t3856.scala
index fd253a56a8..5ea4b84e2c 100644
--- a/test/files/pos/t3856.scala
+++ b/test/files/pos/t3856.scala
@@ -2,6 +2,7 @@ case class C[T](x: T)
case class CS(xs: C[_]*)
+// t3856
object Test {
val x = CS(C(5), C("abc")) match { case CS(C(5), xs @ _*) => xs }
println(x)
diff --git a/test/files/pos/t5305.scala b/test/files/pos/t5305.scala
new file mode 100644
index 0000000000..4c32cd7c6d
--- /dev/null
+++ b/test/files/pos/t5305.scala
@@ -0,0 +1,13 @@
+object t5305 {
+ def in(a: Any) = {}
+
+ object O {
+ type F = Int
+ val v = ""
+ }
+
+ in {
+ import O.{F, v}
+ type x = {type l = (F, v.type)} // not found: type F
+ }
+}