This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 251403 - Bad formatting on anonymous function and new array syntax
Summary: Bad formatting on anonymous function and new array syntax
Status: RESOLVED DUPLICATE of bug 247047
Alias: None
Product: php
Classification: Unclassified
Component: Formatting & Indentation (show other bugs)
Version: 8.0
Hardware: All All
: P3 normal with 1 vote (vote)
Assignee: Ondrej Brejla
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-03-24 16:50 UTC by artur_m
Modified: 2016-03-30 14:01 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description artur_m 2015-03-24 16:50:18 UTC
Product Version = NetBeans IDE Dev (Build 1)
Operating System = Windows 7 version 6.1 running on amd64
Java; VM; Vendor = 1.7.0_45
Runtime = Java HotSpot(TM) 64-Bit Server VM 24.45-b08

Source/Format produce bad formatted braces (all braces configured to newline)

Original:

function bar(){return [function(){echo [];}];}

Formatted:

function bar()
{
	return [function()
		{
			echo [];
		}];
	}
	
	
Expected:

function bar()
{
	return [function()
		{
			echo [];
		}];
}
Comment 1 petrabarus 2015-04-25 05:41:14 UTC
Product Version: NetBeans IDE 8.0.2
Operating System: Ubuntu 14.04
Java:
java version "1.7.0_65"
OpenJDK Runtime Environment (IcedTea 2.5.3) (7u71-2.5.3-0ubuntu0.14.04.1)
OpenJDK 64-Bit Server VM (build 24.65-b04, mixed mode)

I also have the same problem. Here's the example after formatting.

https://drive.google.com/file/d/0BxZZG04eDJFQazN6OFhNWVdSSTQ/view?usp=sharing
Comment 2 junichi11 2016-03-30 14:01:19 UTC

*** This bug has been marked as a duplicate of bug 247047 ***