Open
Description
Details about Problem
Target: ESP32-WROOM-32
Firmware image version: 1.7.3-preview.67
Description
Exception flow is not correctly handled inside finally block when another method catches exception. This also required branching inside the try block so this is some weird edge case here. From the following code we can observe that the program prints out "Impossible!?!" even though the code is unreachable.
try
{
static bool False() => false;
if (!False())
{
Debug.WriteLine("Return!");
return;
}
}
finally
{
Throw();
static void Throw()
{
try
{
throw new Exception();
}
catch
{
}
}
}
Debug.WriteLine("Impossible!?!");
Thread.Sleep(Timeout.Infinite);