Skip to content

Commit 3103bbd

Browse files
author
Adriaan Moors
committed
Merge pull request scala#704 from jdanbrown/patch-1
Breaks.break should return Nothing, not Unit
2 parents 55f5e47 + 6ddd990 commit 3103bbd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/library/scala/util/control/Breaks.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ class Breaks {
7373
*
7474
* @note This might be different than the statically closest enclosing block!
7575
*/
76-
def break() { throw breakException }
76+
def break(): Nothing = { throw breakException }
7777
}
7878

7979
/** An object that can be used for the break control abstraction.

0 commit comments

Comments
 (0)