#1000601

Formatter removes symbol spacing required for successful compilation

    • Created on: Mon, Sep 12 2011 (8 months ago)
    • Reported by: jhalterman
    • Assigned to: MattRussell
    • Milestone: -
    • Type: Defect
    • Version: 2.0.0-beta09-29
    • Operative System: -
    • Status: Fixed
    • Priority: Normal (3)
    • Component: Eclipse
    • Permission type: None
    • Fixed in version: -
    • Eclipse version: Indigo
    When symbols are used as class names, it's possible for the code formatter to eliminate spaces which cause the code to not compile:

    class ^^ {}
    def test(test: ^^ *) {}

    This compiles, but after running the formatter the space before the vararg is eliminated:

    def test(test: ^^*) {}

    The formatter should not be removing this space since it is needed in order for compilation to succeed. Aside from this, there may be other scenarios as well where spaces are needed between symbols in order for compilation to succeed.
  • Followers
     
    Ico-users MattRussell (Assigned To) , Iulian Dragos , jhalterman , nilskp 
     
    Attachments
    No attachments
    Associations
     
    No associations
    Activity
     
    User picture

          on Sep 12, 2011 @ 01:04am UTC * By jhalterman

    Type changed from Enhancement to Defect
    Summary changed from Enhance formatter to support symbol spacing to Formatter removes symbol spacing required for successful compilation
    User picture

          on Sep 12, 2011 @ 02:55am UTC * By MattRussell

    Assigned to set to MattRussell
    User picture

          on Sep 12, 2011 @ 03:21pm UTC * By MattRussell

    Status changed from New to Fixed
    Righty, unary operators were vunerable to this also. I've fixed both in Scalariform, and it should be picked up by the next IDE nightly.

    There were already existing checks to avoid accidental token merges for a couple of other cases, mostly with colons and @. If you can think of any other cases, please do let me know!
    Time Expenditure
    Loading