diff options
author | Lex Spoon <lex@lexspoon.org> | 2006-06-19 12:26:59 +0000 |
---|---|---|
committer | Lex Spoon <lex@lexspoon.org> | 2006-06-19 12:26:59 +0000 |
commit | e670a7bb766e06c6b3f7e1b8e0a61c2bc99aa165 (patch) | |
tree | b208dc1a5a139095540193a6f0b284633e06fb62 /test/pending | |
parent | 5dd59f4127b70c5775e86c2618df7f30527d3f62 (diff) | |
download | scala-e670a7bb766e06c6b3f7e1b8e0a61c2bc99aa165.tar.gz scala-e670a7bb766e06c6b3f7e1b8e0a61c2bc99aa165.tar.bz2 scala-e670a7bb766e06c6b3f7e1b8e0a61c2bc99aa165.zip |
*** empty log message ***
Diffstat (limited to 'test/pending')
-rw-r--r-- | test/pending/run/impconvtimes.scala | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/test/pending/run/impconvtimes.scala b/test/pending/run/impconvtimes.scala new file mode 100644 index 0000000000..a69610b94a --- /dev/null +++ b/test/pending/run/impconvtimes.scala @@ -0,0 +1,17 @@ +object Test { + abstract class Unit + object NoUnit extends Unit + object Hour extends Unit + + case class Measure(scalar: Double, unit: Unit) { + def *(newUnit: Unit) = Measure(scalar, newUnit) + } + + implicit def double2Measure(scalar: Double) = + Measure(scalar, NoUnit) + + + def main(args: Array[String]): scala.Unit = { + Console.println("3.0 * Hour = " + (3.0 * Hour)) + } +} |