aboutsummaryrefslogtreecommitdiff
path: root/tests/pos/implicitonSelect.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2014-05-18 13:17:07 +0200
committerMartin Odersky <odersky@gmail.com>2014-05-30 14:43:39 +0200
commitc70366db8469e81e315fe89672e8321607a7310a (patch)
tree6d0c551ef974121041c578c89c41184182eb065b /tests/pos/implicitonSelect.scala
parente43c3aaa61e570de1cb80b1766fb3e3988c444a0 (diff)
downloaddotty-c70366db8469e81e315fe89672e8321607a7310a.tar.gz
dotty-c70366db8469e81e315fe89672e8321607a7310a.tar.bz2
dotty-c70366db8469e81e315fe89672e8321607a7310a.zip
Always ignore type in selectionProto
The type of a SelectionProto needs to be ignorable because there might be an implicit conversion on the selection. E.g. implicit def a2b(x: A): B = ??? val x: { a: A } = ??? val b: B = x.a This was previously handled by allowing implicit conversions in compatibility checks. But it turns out we can afford to ignore the type of a selectProto and unignore on ambiguities later.
Diffstat (limited to 'tests/pos/implicitonSelect.scala')
-rw-r--r--tests/pos/implicitonSelect.scala8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/pos/implicitonSelect.scala b/tests/pos/implicitonSelect.scala
new file mode 100644
index 000000000..4f5f90ada
--- /dev/null
+++ b/tests/pos/implicitonSelect.scala
@@ -0,0 +1,8 @@
+object test {
+ class A
+ class B
+ implicit def a2b(x: A): B = new B
+ class ARef { val a: A = new A }
+ val x = new ARef
+ val b: B = x.a
+}