From c70366db8469e81e315fe89672e8321607a7310a Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Sun, 18 May 2014 13:17:07 +0200 Subject: 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. --- tests/pos/implicitonSelect.scala | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 tests/pos/implicitonSelect.scala (limited to 'tests/pos/implicitonSelect.scala') 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 +} -- cgit v1.2.3