summaryrefslogtreecommitdiff
path: root/test/files/pos
diff options
context:
space:
mode:
authorGrzegorz Kossakowski <grzegorz.kossakowski@gmail.com>2013-09-05 13:32:08 -0700
committerGrzegorz Kossakowski <grzegorz.kossakowski@gmail.com>2013-09-05 13:32:08 -0700
commit46335e4d7433bfb8e275b4afb3694c7c6d07b767 (patch)
tree5bcb9cd608f61082ecae6bfd9477a5fdb097c569 /test/files/pos
parent5044f1c1e863ca75c6f49462d370e48b51f3e8c7 (diff)
parentd46519da657ada39d9928308709cdb80ddcd53ce (diff)
downloadscala-46335e4d7433bfb8e275b4afb3694c7c6d07b767.tar.gz
scala-46335e4d7433bfb8e275b4afb3694c7c6d07b767.tar.bz2
scala-46335e4d7433bfb8e275b4afb3694c7c6d07b767.zip
Merge remote-tracking branch 'scala/2.10.x' into merge-2.10.x
Conflicts: bincompat-backward.whitelist.conf bincompat-forward.whitelist.conf src/reflect/scala/reflect/internal/SymbolTable.scala src/reflect/scala/reflect/internal/util/WeakHashSet.scala src/reflect/scala/reflect/runtime/JavaMirrors.scala
Diffstat (limited to 'test/files/pos')
-rw-r--r--test/files/pos/t4760.scala34
-rw-r--r--test/files/pos/t7782.scala25
-rw-r--r--test/files/pos/t7782b.scala25
3 files changed, 84 insertions, 0 deletions
diff --git a/test/files/pos/t4760.scala b/test/files/pos/t4760.scala
new file mode 100644
index 0000000000..767e3847f4
--- /dev/null
+++ b/test/files/pos/t4760.scala
@@ -0,0 +1,34 @@
+
+class Test {
+ // parses
+ def f1 = {
+ import scala._;
+ }
+ // b.scala:7: error: ';' expected but '}' found.
+ // }
+ // ^
+ // one error found
+ def f2 = {
+ import scala._
+ }
+ def f2b = {
+ import scala.collection.mutable.{ Map => MMap }
+ }
+ def f(): Unit = {
+ locally {
+ import scala.util.Properties.lineSeparator
+ }
+ }
+
+ // parses
+ def f3 = {
+ import scala._
+ 5
+ }
+ locally { (x: Int) =>
+ import scala.util._
+ }
+ 1 match {
+ case 1 => import scala.concurrent._
+ }
+}
diff --git a/test/files/pos/t7782.scala b/test/files/pos/t7782.scala
new file mode 100644
index 0000000000..037bdad673
--- /dev/null
+++ b/test/files/pos/t7782.scala
@@ -0,0 +1,25 @@
+package pack
+
+object Test {
+ import O.empty
+ empty // this will trigger completion of `test`
+ // with skolemizationLevel = 1
+}
+
+object O {
+ // order matters (!!!)
+
+ // this order breaks under 2.10.x
+ def empty[E]: C[E] = ???
+ def empty(implicit a: Any): Any = ???
+}
+
+abstract class C[E] {
+ def foo[BB](f: BB)
+ def test[B](f: B): Any = foo(f)
+ // error: no type parameters for method foo: (<param> f: BB)scala.this.Unit exist so that it can be applied to arguments (B&1)
+ // --- because ---
+ // argument expression's type is not compatible with formal parameter type;
+ // found : B&1
+ // required: ?BB
+}
diff --git a/test/files/pos/t7782b.scala b/test/files/pos/t7782b.scala
new file mode 100644
index 0000000000..09da4a5c5b
--- /dev/null
+++ b/test/files/pos/t7782b.scala
@@ -0,0 +1,25 @@
+package pack
+
+object Test {
+ import O.empty
+ empty // this will trigger completion of `test`
+ // with skolemizationLevel = 1
+}
+
+object O {
+ // order matters (!!!)
+
+ // this order breaks under 2.11.x
+ def empty(implicit a: Any): Any = ???
+ def empty[E]: C[E] = ???
+}
+
+abstract class C[E] {
+ def foo[BB](f: BB)
+ def test[B](f: B): Any = foo(f)
+ // error: no type parameters for method foo: (<param> f: BB)scala.this.Unit exist so that it can be applied to arguments (B&1)
+ // --- because ---
+ // argument expression's type is not compatible with formal parameter type;
+ // found : B&1
+ // required: ?BB
+}