diff options
Diffstat (limited to 'test/files/run/t5080.scala')
-rw-r--r-- | test/files/run/t5080.scala | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/test/files/run/t5080.scala b/test/files/run/t5080.scala new file mode 100644 index 0000000000..ce72d13a54 --- /dev/null +++ b/test/files/run/t5080.scala @@ -0,0 +1,24 @@ +object Test extends App { + + abstract class Value { + } + + case class Num(value: Int) extends Value { + override def toString = value.toString; + } + + implicit def conversions(x: Value) = new { + def toInt = + x match { + case Num(n) => n + case _ => throw new RuntimeException + } + } + + def eval(v: Value): Value = { + println("hey") + Num(1) + } + + eval(Num(1)).toInt +} |