summaryrefslogtreecommitdiff
path: root/test/pending/run
diff options
context:
space:
mode:
Diffstat (limited to 'test/pending/run')
-rw-r--r--test/pending/run/t4560.scala9
-rw-r--r--test/pending/run/t4728.check2
-rw-r--r--test/pending/run/t4728.scala11
-rw-r--r--test/pending/run/t5610a.check1
-rw-r--r--test/pending/run/t5610a.scala19
-rw-r--r--test/pending/run/t5610b.check1
-rw-r--r--test/pending/run/t5610b.scala21
-rw-r--r--test/pending/run/t5695.check2
-rw-r--r--test/pending/run/t5695/part_1.scala12
-rw-r--r--test/pending/run/t5695/part_2.scala8
-rw-r--r--test/pending/run/t5722.scala6
11 files changed, 92 insertions, 0 deletions
diff --git a/test/pending/run/t4560.scala b/test/pending/run/t4560.scala
new file mode 100644
index 0000000000..fe62136319
--- /dev/null
+++ b/test/pending/run/t4560.scala
@@ -0,0 +1,9 @@
+trait B {
+ this: Test.type =>
+
+ def y = new { def f() = () }
+ def fail() = y.f()
+}
+object Test extends B {
+ def main(args: Array[String]): Unit = fail()
+} \ No newline at end of file
diff --git a/test/pending/run/t4728.check b/test/pending/run/t4728.check
new file mode 100644
index 0000000000..7a754f414c
--- /dev/null
+++ b/test/pending/run/t4728.check
@@ -0,0 +1,2 @@
+1
+2 \ No newline at end of file
diff --git a/test/pending/run/t4728.scala b/test/pending/run/t4728.scala
new file mode 100644
index 0000000000..36f7860613
--- /dev/null
+++ b/test/pending/run/t4728.scala
@@ -0,0 +1,11 @@
+class X
+class Y extends X
+object Ambiguous {
+ def f(x: X) = 1
+ def f(ys: Y*) = 2
+}
+
+object Test extends App {
+ println(Ambiguous.f(new X))
+ println(Ambiguous.f(new Y))
+} \ No newline at end of file
diff --git a/test/pending/run/t5610a.check b/test/pending/run/t5610a.check
new file mode 100644
index 0000000000..2aa46b3b91
--- /dev/null
+++ b/test/pending/run/t5610a.check
@@ -0,0 +1 @@
+Stroke a kitten
diff --git a/test/pending/run/t5610a.scala b/test/pending/run/t5610a.scala
new file mode 100644
index 0000000000..f20b295762
--- /dev/null
+++ b/test/pending/run/t5610a.scala
@@ -0,0 +1,19 @@
+object Test extends App {
+ class Result(_str: => String) {
+ lazy val str = _str
+ }
+
+ def foo(str: => String)(i: Int) = new Result(str)
+
+ def bar(f: Int => Result) = f(42)
+
+ var test: String = null
+ val result = bar(foo(test))
+ test = "bar"
+
+ if (result.str == null) {
+ println("Destroy ALL THE THINGS!!!")
+ } else {
+ println("Stroke a kitten")
+ }
+} \ No newline at end of file
diff --git a/test/pending/run/t5610b.check b/test/pending/run/t5610b.check
new file mode 100644
index 0000000000..2aa46b3b91
--- /dev/null
+++ b/test/pending/run/t5610b.check
@@ -0,0 +1 @@
+Stroke a kitten
diff --git a/test/pending/run/t5610b.scala b/test/pending/run/t5610b.scala
new file mode 100644
index 0000000000..d922d6333c
--- /dev/null
+++ b/test/pending/run/t5610b.scala
@@ -0,0 +1,21 @@
+object Bug {
+ def main(args: Array[String]) {
+ var test: String = null
+ val result = bar(foo(test))
+ test = "bar"
+
+ if (result.str == null) {
+ println("Destroy ALL THE THINGS!!!")
+ } else {
+ println("Stroke a kitten")
+ }
+ }
+
+ class Result(_str: => String) {
+ lazy val str = _str
+ }
+
+ def foo(str: => String)(i: Int) = new Result(str)
+
+ def bar(f: Int => Result) = f(42)
+} \ No newline at end of file
diff --git a/test/pending/run/t5695.check b/test/pending/run/t5695.check
new file mode 100644
index 0000000000..d50069ab4f
--- /dev/null
+++ b/test/pending/run/t5695.check
@@ -0,0 +1,2 @@
+..
+..
diff --git a/test/pending/run/t5695/part_1.scala b/test/pending/run/t5695/part_1.scala
new file mode 100644
index 0000000000..b8e8f8e52f
--- /dev/null
+++ b/test/pending/run/t5695/part_1.scala
@@ -0,0 +1,12 @@
+import language.experimental.macros
+import scala.reflect.makro.Context
+
+object Defs {
+
+ def mkInt = macro mkIntImpl
+ def mkIntImpl(c: Context): c.Expr[Any] = {
+ println(c.enclosingApplication)
+ c.reify{ 23 }
+ }
+
+}
diff --git a/test/pending/run/t5695/part_2.scala b/test/pending/run/t5695/part_2.scala
new file mode 100644
index 0000000000..d34219437d
--- /dev/null
+++ b/test/pending/run/t5695/part_2.scala
@@ -0,0 +1,8 @@
+import Defs._
+
+object Test extends App {
+
+ val i1 = mkInt
+ val i2 = identity(mkInt)
+
+}
diff --git a/test/pending/run/t5722.scala b/test/pending/run/t5722.scala
new file mode 100644
index 0000000000..21ace060d6
--- /dev/null
+++ b/test/pending/run/t5722.scala
@@ -0,0 +1,6 @@
+object Test extends App {
+ def foo[T: ClassTag] = println(classOf[T])
+ foo[Int]
+ foo[Array[Int]]
+ foo[List[Int]]
+} \ No newline at end of file