Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Broken comment with braces #326

Open
ze0nni opened this issue Jan 18, 2018 · 4 comments
Open

Broken comment with braces #326

ze0nni opened this issue Jan 18, 2018 · 4 comments
Labels

Comments

@ze0nni
Copy link

ze0nni commented Jan 18, 2018

as3 code for example:

package {
    public class Issue {
        public function Issue() {
            if (true)
            {
                //broken comment{
                doIt();
            }
        }
    }
}

expected result

class Issue
{
    public function new()
    {
            if (true)
            {
                //broken comment{
                doIt();
            }
    }
}

actual result

class Issue
{
    public function new()
    {
            if (true)
            
                //broken comment{{
                doIt();
            }
    }
}
@SlavaRa
Copy link
Member

SlavaRa commented Jan 18, 2018

Library from git?

@ze0nni
Copy link
Author

ze0nni commented Jan 18, 2018

Right. Buld from this revision 2a1a0f50ed0a23b9f3d14be53b0341dfaaaebaab

@chatziko
Copy link

chatziko commented Jan 19, 2018

Same thing here. It's actually much worse than decribed, there's no need to have a brace inside the comment, it's enough to simply have a comment right after a brace, which happens very often.

package {
    public class Issue {
        public function Issue() {
            if (true)
            {
                //comment
                doIt();
            }
        }
    }
}

Result:

class Issue {
	public function new() {
		if (true) 
		//comment{
			
			doIt();
		}
	}
}

The brace ends up in the comment, so the .hx doesn't even compile.

Some thing for opening braces of functions:

package {
    public class Issue {
        public function Issue() {
            //comment
            doIt();
        }
    }
}

Result:

class Issue {
	public function new() 
	//comment{
		
		doIt();
	}
}

@SlavaRa SlavaRa added the bug label Jan 19, 2018
@ProdigytTest
Copy link

Experiencing same trouble

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants