summaryrefslogtreecommitdiff
path: root/test/files/run/retsynch.scala
diff options
context:
space:
mode:
Diffstat (limited to 'test/files/run/retsynch.scala')
-rw-r--r--test/files/run/retsynch.scala11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/files/run/retsynch.scala b/test/files/run/retsynch.scala
new file mode 100644
index 0000000000..d6398cf28e
--- /dev/null
+++ b/test/files/run/retsynch.scala
@@ -0,0 +1,11 @@
+object Test {
+ def abs(x:int): int = synchronized {
+ if(x > 0)
+ return x
+ return -x
+ }
+
+ def main(args: Array[String]) = {
+ Console.println("abs(-5) = " + abs(-5))
+ }
+}