diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/files/run/t5080.check | 1 | ||||
-rw-r--r-- | test/files/run/t5080.scala | 24 |
2 files changed, 25 insertions, 0 deletions
diff --git a/test/files/run/t5080.check b/test/files/run/t5080.check new file mode 100644 index 0000000000..1385f264af --- /dev/null +++ b/test/files/run/t5080.check @@ -0,0 +1 @@ +hey 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 +} |