aboutsummaryrefslogtreecommitdiff
path: root/tests/untried/pos/test4.scala
diff options
context:
space:
mode:
authorSamuel Gruetter <samuel.gruetter@epfl.ch>2014-03-12 22:44:33 +0100
committerSamuel Gruetter <samuel.gruetter@epfl.ch>2014-03-12 22:44:33 +0100
commit9ef5f6817688f814a3450126aa7383b0928e80a0 (patch)
tree5727a2f7f7fd665cefdb312af2785c692f04377c /tests/untried/pos/test4.scala
parent194be919664447631ba55446eb4874979c908d27 (diff)
downloaddotty-9ef5f6817688f814a3450126aa7383b0928e80a0.tar.gz
dotty-9ef5f6817688f814a3450126aa7383b0928e80a0.tar.bz2
dotty-9ef5f6817688f814a3450126aa7383b0928e80a0.zip
add tests from scala/test/files/{pos,neg}
with explicit Unit return type
Diffstat (limited to 'tests/untried/pos/test4.scala')
-rw-r--r--tests/untried/pos/test4.scala47
1 files changed, 47 insertions, 0 deletions
diff --git a/tests/untried/pos/test4.scala b/tests/untried/pos/test4.scala
new file mode 100644
index 000000000..4fe65a8f1
--- /dev/null
+++ b/tests/untried/pos/test4.scala
@@ -0,0 +1,47 @@
+package test;
+
+trait C {}
+trait D {}
+trait E {}
+
+object test {
+ def c: C = c;
+ def d: D = d;
+ def e: E = e;
+}
+
+import test._;
+
+trait S extends ooo.I[D] {
+ def bar: E = foo(c,d);
+}
+
+class O[X]() {
+ trait I[Y] {
+ def foo(x: X, y: Y): E = e;
+ }
+ val i:I[E] = null;
+ val j:I[X] = null;
+}
+
+object ooo extends O[C]() {
+
+ def main = {
+ val s: S = null;
+ import s._;
+ foo(c,d);
+ ooo.i.foo(c,e);
+ ooo.j.foo(c,c);
+ bar
+ }
+}
+
+class Main() {
+ val s: S = null;
+ import s._;
+ foo(c,d);
+ ooo.i.foo(c,e);
+ ooo.j.foo(c,c);
+ bar;
+}
+