Odd re-indent behaviour for computed properties

Originator:steve_w101
Number:rdar://17216122 Date Originated:7-June-2014
Status:Duplicate Resolved:Duplicate of 16747499
Product:Developer Tools Product Version:6.0
Classification: Reproducible:Always
 
Summary:
The indentation produced by the Editor -> Structure -> Re-indent menu item (or ˆ+i) is not particularly pretty. The get and set keywords are inline with the var/let keyword, and the closing braces are inline with the closing brace of the computed property itself.

Steps to Reproduce:
Use Re-indent / ˆ+i on the following code block.

class ExampleClass {
    var someInt = 42
    
    var myString: String? {
    get {
        if someInt == 42 {
            return "Hello Swift"
        }
        else {
            return "Goodbye Objective-C"
        }
    }
    set (newString) {
        // do something
    }
    }
}

Expected Results:
The get and set code blocks should be indented one further level.

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!