summaryrefslogtreecommitdiff
path: root/test/files/pos
diff options
context:
space:
mode:
authorJason Zaugg <jzaugg@gmail.com>2014-05-08 23:21:29 +0200
committerJason Zaugg <jzaugg@gmail.com>2014-05-09 11:47:19 +0200
commita13231498f1c6661706cbf4baf9f5c3374bc85cd (patch)
treec69cf3fb66f6e0ed2309f1d9ec296c5d5a8ad56a /test/files/pos
parent972244d7e3de18c833b179277912c737301b5437 (diff)
parentb5392a0f034afe23aff183d8673464c848f76241 (diff)
downloadscala-a13231498f1c6661706cbf4baf9f5c3374bc85cd.tar.gz
scala-a13231498f1c6661706cbf4baf9f5c3374bc85cd.tar.bz2
scala-a13231498f1c6661706cbf4baf9f5c3374bc85cd.zip
Merge commit 'b5392a0' into merge/master-to-2.11.x
Diffstat (limited to 'test/files/pos')
-rw-r--r--test/files/pos/t8157-2.10.flags1
-rw-r--r--test/files/pos/t8157-2.10.scala5
-rw-r--r--test/files/pos/t8325.scala9
-rw-r--r--test/files/pos/t8523.flags1
-rw-r--r--test/files/pos/t8523.scala10
5 files changed, 26 insertions, 0 deletions
diff --git a/test/files/pos/t8157-2.10.flags b/test/files/pos/t8157-2.10.flags
new file mode 100644
index 0000000000..94c8056747
--- /dev/null
+++ b/test/files/pos/t8157-2.10.flags
@@ -0,0 +1 @@
+-Xsource:2.10
diff --git a/test/files/pos/t8157-2.10.scala b/test/files/pos/t8157-2.10.scala
new file mode 100644
index 0000000000..597585a96d
--- /dev/null
+++ b/test/files/pos/t8157-2.10.scala
@@ -0,0 +1,5 @@
+object Test { // PolyTYped function default arg unicity check,
+ // fails in 2.11, authorized under -Xsource:2.10
+ def foo(printer: Any, question: => String, show: Boolean = false)(op: => Any): Any = ???
+ def foo[T](question: => String, show: Boolean)(op: => Any = ()): Any = ???
+}
diff --git a/test/files/pos/t8325.scala b/test/files/pos/t8325.scala
new file mode 100644
index 0000000000..af33ee7bb3
--- /dev/null
+++ b/test/files/pos/t8325.scala
@@ -0,0 +1,9 @@
+
+trait Test {
+ type +[A, B] = (A, B)
+ type *[A, B] = (A, B)
+
+ type X[A, B] = A + B
+ type Y[A, B] = A * B
+ type Z[A, B] = A `*` B
+}
diff --git a/test/files/pos/t8523.flags b/test/files/pos/t8523.flags
new file mode 100644
index 0000000000..c7d406c649
--- /dev/null
+++ b/test/files/pos/t8523.flags
@@ -0,0 +1 @@
+-Ywarn-dead-code -Xfatal-warnings \ No newline at end of file
diff --git a/test/files/pos/t8523.scala b/test/files/pos/t8523.scala
new file mode 100644
index 0000000000..dfcb35404d
--- /dev/null
+++ b/test/files/pos/t8523.scala
@@ -0,0 +1,10 @@
+import scala.language.experimental.macros
+import scala.reflect.macros.blackbox.Context
+
+class Impl(val c: Context) {
+ def impl: c.Tree = ???
+}
+
+object Macros {
+ def foo: Any = macro Impl.impl
+} \ No newline at end of file