aboutsummaryrefslogtreecommitdiff
path: root/tests/run/t0042.scala
diff options
context:
space:
mode:
Diffstat (limited to 'tests/run/t0042.scala')
-rw-r--r--tests/run/t0042.scala9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/run/t0042.scala b/tests/run/t0042.scala
new file mode 100644
index 000000000..57c8563f0
--- /dev/null
+++ b/tests/run/t0042.scala
@@ -0,0 +1,9 @@
+object Test extends dotty.runtime.LegacyApp {
+ def getClause[T](clauses: List[T]): Option[T] = {
+ for (c <- clauses) {
+ return Some(c)
+ }
+ return None
+ }
+ println(getClause(List(1, 2, 3)))
+}