aboutsummaryrefslogtreecommitdiff
path: root/tests/pos
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2014-12-15 12:57:13 +0100
committerMartin Odersky <odersky@gmail.com>2014-12-15 12:58:22 +0100
commit413bcebf5a87102b1f1b2840b92b6a8017aa16df (patch)
treeb3fe9788ef0a28e5d213be1c761f8838530dfc48 /tests/pos
parent9bc3bb2d1fe3348bc7a92e5cb38a7d9f77166a71 (diff)
downloaddotty-413bcebf5a87102b1f1b2840b92b6a8017aa16df.tar.gz
dotty-413bcebf5a87102b1f1b2840b92b6a8017aa16df.tar.bz2
dotty-413bcebf5a87102b1f1b2840b92b6a8017aa16df.zip
Fix to asSeenFrom for package object members
Like TypeAssigner, asSeenFrom needs to insert a package object if the prefix is a package but the class enclosing the type is not.
Diffstat (limited to 'tests/pos')
-rw-r--r--tests/pos/i0239.scala24
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/pos/i0239.scala b/tests/pos/i0239.scala
new file mode 100644
index 000000000..0dfba7ea0
--- /dev/null
+++ b/tests/pos/i0239.scala
@@ -0,0 +1,24 @@
+package p {
+ class C[A] {
+ implicit def foo: M[A] = ???
+ }
+
+ object `package` extends C[String]
+
+ object test0 {
+ def compute[A](implicit m: M[A]): A = ???
+ val v = compute
+ val v1: String = v
+ }
+}
+
+trait M[A]
+
+object test1 {
+
+ def compute[A](implicit m: M[A]): A = ???
+
+ import p._
+ val v = compute
+ val v1: String = v
+}