summaryrefslogtreecommitdiff
path: root/test/files/run/t9422.scala
diff options
context:
space:
mode:
Diffstat (limited to 'test/files/run/t9422.scala')
-rw-r--r--test/files/run/t9422.scala11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/files/run/t9422.scala b/test/files/run/t9422.scala
new file mode 100644
index 0000000000..5ca2e8daaa
--- /dev/null
+++ b/test/files/run/t9422.scala
@@ -0,0 +1,11 @@
+class Test(val x: Long) {
+ def sameDirection(y: Long): Boolean =
+ (y == 0 || x == 0 || ((y > 0) == (x > 0)))
+}
+
+object Test {
+ def main(args: Array[String]) {
+ val b = new Test(1L)
+ assert(!b.sameDirection(-1L))
+ }
+}