Bug 673 - Formatter adds extra parenthesis (Version 2.6 release)
Summary: Formatter adds extra parenthesis (Version 2.6 release)
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: Text Editor ()
Version: 2.6 RC 1
Hardware: PC Mac OS
: --- normal
Target Milestone: ---
Assignee: Mike Krüger
Depends on:
Reported: 2011-09-07 18:41 UTC by vinkaga
Modified: 2011-09-30 00:41 UTC (History)
1 user (show)

Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description vinkaga 2011-09-07 18:41:00 UTC
For the following line, if "force parenthesis" is set with K&R style (parentheses at line end), the formatter adds an extra parenthesis

Original text

if (callbackOnMainThread)
	invoker.BeginInvokeOnMainThread (delegate { InvokeCallback (callback, stream); });
	InvokeCallback (callback, stream);

Gets formatted to

if (callbackOnMainThread) {
	invoker.BeginInvokeOnMainThread(delegate {
		InvokeCallback(callback, stream); });
} else {
	InvokeCallback(callback, stream);
Comment 1 Mike Krüger 2011-09-19 08:30:58 UTC
I have problems reproducing this.


Can you give me a small sample project with the settings where that happened ?
Comment 2 Mike Krüger 2011-09-30 00:41:59 UTC
Can't repro/works in 2.8.