summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/files/neg/bug765.check4
-rw-r--r--test/files/neg/bug765.scala7
-rw-r--r--test/files/pos/bug759.scala6
3 files changed, 17 insertions, 0 deletions
diff --git a/test/files/neg/bug765.check b/test/files/neg/bug765.check
new file mode 100644
index 0000000000..474367c4c5
--- /dev/null
+++ b/test/files/neg/bug765.check
@@ -0,0 +1,4 @@
+bug765.scala:3 error: not found: type Bar123
+ val bar = new Bar123
+ ^
+one error found
diff --git a/test/files/neg/bug765.scala b/test/files/neg/bug765.scala
new file mode 100644
index 0000000000..f1100df55a
--- /dev/null
+++ b/test/files/neg/bug765.scala
@@ -0,0 +1,7 @@
+object test {
+ for (val e <- List()) { //required
+ val bar = new Bar123
+ val res = bar.f //required
+ ()
+ }
+}
diff --git a/test/files/pos/bug759.scala b/test/files/pos/bug759.scala
new file mode 100644
index 0000000000..2eac89cd60
--- /dev/null
+++ b/test/files/pos/bug759.scala
@@ -0,0 +1,6 @@
+object Test extends Application {
+
+ def f[A](x : => A) = x
+
+ Console.println(f(Array(42))(0))
+}