summaryrefslogtreecommitdiff
path: root/test/files/pos
diff options
context:
space:
mode:
Diffstat (limited to 'test/files/pos')
-rw-r--r--test/files/pos/dotless-targs.flags1
-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
6 files changed, 27 insertions, 0 deletions
diff --git a/test/files/pos/dotless-targs.flags b/test/files/pos/dotless-targs.flags
new file mode 100644
index 0000000000..ea7fc37e1a
--- /dev/null
+++ b/test/files/pos/dotless-targs.flags
@@ -0,0 +1 @@
+-Yrangepos:false
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