dfmt/tests/issue0372.d
Laurent Tréguier c84db53c7c Fix #372 - Improper indentation after single-line catch (#395)
Fix #372 - Improper indentation after single-line catch
merged-on-behalf-of: BBasile <BBasile@users.noreply.github.com>
2018-10-08 13:32:15 +02:00

22 lines
336 B
D

void main(string[] args)
{
// Test with catch
if (args.length > 1)
try
doSomeStuff();
catch (Exception error)
ohNoSomeErrorHappened();
else
thatsNotHowYouUseThisProgram();
// Test with finally
if (args.length > 2)
try
doOtherStuff();
catch (Exception error)
ohNoSomeErrorHappened();
finally
doSomeCleanup();
else
dontDoOtherStuff();
}