diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/compiler/scala/tools/nsc/backend/opt/Inliners.scala | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/backend/opt/Inliners.scala b/src/compiler/scala/tools/nsc/backend/opt/Inliners.scala index 95d94d2e6d..9c1489a637 100644 --- a/src/compiler/scala/tools/nsc/backend/opt/Inliners.scala +++ b/src/compiler/scala/tools/nsc/backend/opt/Inliners.scala @@ -444,7 +444,13 @@ abstract class Inliners extends SubComponent { callsNonPublic = b case None => // Avoiding crashing the compiler if there are open blocks. - if (callee.code.blocks exists (x => !x.closed)) return false + callee.code.blocks filterNot (_.closed) foreach { b => + currentIClazz.cunit.warning(callee.symbol.pos, + "Encountered open block in isSafeToInline: this indicates a bug in the optimizer!\n" + + " caller = " + caller + ", callee = " + callee + ) + return false + } breakable { for (b <- callee.code.blocks; i <- b) |