Skip to content

Resolve "Bring back switch scopes"

Erwan DUHAMEL requested to merge 45-bring-back-switch-scopes into dev

Description

Brings back scopes to case statements.

Closes #45 (closed)

How to test it?

Run sheldon on code with a switch / case statement. If you are too lazy to write one, here is a snippet you can copy/paste:

const unsigned value = 0;

switch(value)
{
	case(0):
	{
		std::cout << "NIICE" << std::endl;
	}
	case(1):
		std::cout << "Does not add scopes when you do not want them."
	default:
	{
		std::cout << "I like cheese." << std::endl;
	}
}

Some results

See above.

Edited by Erwan DUHAMEL

Merge request reports