From ed9669f57a77f787b2ed8d2cad2561e57f17dc5c Mon Sep 17 00:00:00 2001 From: Hubert Plociniczak Date: Tue, 17 Jul 2012 17:57:05 +0200 Subject: Fixes SI-5588. Correct compare for Enumeration. Slower than the original one but does comparison in the same spirit as IntOrdering. Review by @axel22. --- test/files/run/t5588.check | 2 ++ test/files/run/t5588.scala | 14 ++++++++++++++ 2 files changed, 16 insertions(+) create mode 100644 test/files/run/t5588.check create mode 100644 test/files/run/t5588.scala (limited to 'test') diff --git a/test/files/run/t5588.check b/test/files/run/t5588.check new file mode 100644 index 0000000000..bb101b641b --- /dev/null +++ b/test/files/run/t5588.check @@ -0,0 +1,2 @@ +true +true diff --git a/test/files/run/t5588.scala b/test/files/run/t5588.scala new file mode 100644 index 0000000000..f214d16684 --- /dev/null +++ b/test/files/run/t5588.scala @@ -0,0 +1,14 @@ +object Test { + object MyEnum extends Enumeration { + val Foo = Value(2000000000) + val Bar = Value(-2000000000) + val X = Value(Integer.MAX_VALUE) + val Y = Value(Integer.MIN_VALUE) + } + + import MyEnum._ + def main(args: Array[String]) { + println(Foo > Bar) + println(X > Y) + } +} -- cgit v1.2.3