Title: 
  Script based function doesn't format when "var i" is present in the loop declaration
| View in TrackerStatus/Resolution/Reason: To Fix//
Reporter/Name(from Bugbase): Sam Mitchell / stoked744 (stoked744)
Created: 07/01/2014
Components: General - IDE
Versions: 2016,3.0,2018
Failure Type:
Found In Build/Fixed In Build: 3.0 Final /
Priority/Frequency: Major / All users will encounter
Locale/System: English / Windows 7 SP1 64-bit
Vote Count: 0
The below function won't format in the editor (ctrl-t-m) when the var keyword is present in the loop declaration:
public numeric function getTotalHoursForThisReport(){
		
		var hours = 0;
		
		for(var i in this.getWorkPerformed()){
			hours+= i.getHours();
		}
		
		return hours;
		
	}
If you remove the var keyword from the loop the function formats as expected.
----------------------------- Additional Watson Details -----------------------------
Watson Bug ID:	3783894
External Customer Info:
External Company:  
External Customer Name: stoked744
External Customer Email:  
External Test Config: Windows 7 64bit
  Attachments:
Comments: