summaryrefslogtreecommitdiff
path: root/test/pending/pos/t2194.scala
diff options
context:
space:
mode:
Diffstat (limited to 'test/pending/pos/t2194.scala')
-rw-r--r--test/pending/pos/t2194.scala21
1 files changed, 7 insertions, 14 deletions
diff --git a/test/pending/pos/t2194.scala b/test/pending/pos/t2194.scala
index 6197ca0e90..e87be509d1 100644
--- a/test/pending/pos/t2194.scala
+++ b/test/pending/pos/t2194.scala
@@ -1,15 +1,8 @@
-scala> class C
-defined class C
+// tricky to do differently?
+class C
-scala> def f = { object o extends C; o}
-f: ewo.type forSome { val o: o; type o <: C with ScalaObject }
-
-scala> val x = f
-<console>:6: error: type mismatch;
- found : o.type(in object $iw) where type o.type(in object $iw) <: o with Singleton
- required: o.type(in value x) forSome { type o.type(in value x) <: o with Singleton; type o <: C with ScalaObject }
- val x = f
- ^
-
-scala> val x : C = f
-x: C = o$2$@111985e
+object Test {
+ def f = { object o extends C; o}
+ val y: C = f
+ val x = f
+}