From c854cc7fcc9d0f889c6235c1534133cff7360e7f Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Mon, 17 Mar 2014 18:44:39 +0100 Subject: More tests --- tests/pos/t1014.scala | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 tests/pos/t1014.scala (limited to 'tests/pos/t1014.scala') diff --git a/tests/pos/t1014.scala b/tests/pos/t1014.scala new file mode 100644 index 000000000..6fb7f7ba4 --- /dev/null +++ b/tests/pos/t1014.scala @@ -0,0 +1,16 @@ +class NodeSeq +class Elem extends NodeSeq + +class EO extends App with Moo { + // return type is Flog, inherited from overridden method. + // implicit conversions are applied because expected type `pt` is `Flog` when `computeType(rhs, pt)`. + def cat = (??? : Elem) + + implicit def nodeSeqToFlog(in: Elem): Flog = new Flog(in) +} + +trait Moo { + def cat: Flog +} + +class Flog(val in: NodeSeq) -- cgit v1.2.3