File tree Expand file tree Collapse file tree 2 files changed +17
-1
lines changed
compiler/src/dotty/tools/dotc/transform Expand file tree Collapse file tree 2 files changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -71,7 +71,8 @@ class ElimByName extends MiniPhaseTransform with InfoTransformer { thisTransform
71
71
72
72
def transformArg (arg : Tree , formal : Type ): Tree = formal.dealias match {
73
73
case formalExpr : ExprType =>
74
- val argType = arg.tpe.widenIfUnstable
74
+ var argType = arg.tpe.widenIfUnstable
75
+ if (defn.isBottomType(argType)) argType = formal.widenExpr
75
76
val argFun = arg match {
76
77
case Apply (Select (qual, nme.apply), Nil )
77
78
if qual.tpe.derivesFrom(defn.FunctionClass (0 )) && isPureExpr(qual) =>
Original file line number Diff line number Diff line change
1
+ object Test {
2
+ import scala .util .control .Breaks
3
+
4
+ def brk (f : () => Unit ): Unit = try {
5
+ f()
6
+ } catch {
7
+ case ex : NotImplementedError =>
8
+ }
9
+ def main (args : Array [String ]): Unit = {
10
+ brk { () => ??? }
11
+ Breaks .breakable {
12
+ Breaks .break
13
+ }
14
+ }
15
+ }
You can’t perform that action at this time.
0 commit comments