From 354e05b8db4ca47fe9434e3989f3d5fd1b2ce37f Mon Sep 17 00:00:00 2001 From: Paul Phillips Date: Sat, 22 May 2010 06:09:00 +0000 Subject: Made workaround for #3430 noisier during its wo... Made workaround for #3430 noisier during its working around so we don't get complacent about whether there's still a bug in the optimizer. Conceived by dragos, ergo no review. --- src/compiler/scala/tools/nsc/backend/opt/Inliners.scala | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src') 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) -- cgit v1.2.3