vineflower icon indicating copy to clipboard operation
vineflower copied to clipboard

"Could not verify finally blocks" message

Open zsrv opened this issue 1 year ago • 0 comments

Version: Quiltflower 1.10.0 (commit 1f6ae217053f59dac8614e4a80cedca0c05c18e9)

Original code:

public class Example {
    public static void main(String[] args) {
        try {
            System.out.println(".");
        } finally {
            int i = 0;
            while (i != 1) {
                i++;
            }
        }
    }
}

Quiltflower output:

public class Example {
   // $QF: Could not verify finally blocks. A semaphore variable has been added to preserve control flow.
   // Please report this to the Quiltflower issue tracker, at https://github.com/QuiltMC/quiltflower/issues with a copy of the class file (if you have the rights to distribute it!)
   public static void main(String[] var0) {
      boolean var5 = false /* QF: Semaphore variable */;

      try {
         var5 = true;
         System.out.println(".");
         var5 = false;
      } finally {
         if (var5) {
            int var3 = 0;

            while (var3 != 1) {
               ++var3;
            }
         }
      }

      int var1 = 0;

      while (var1 != 1) {
         ++var1;
      }
   }
}

zsrv avatar Apr 19 '23 11:04 zsrv