as3hx
as3hx copied to clipboard
Broken comment with braces
trafficstars
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();
}
}
}
Library from git?
Right. Buld from this revision 2a1a0f50ed0a23b9f3d14be53b0341dfaaaebaab
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();
}
}
Experiencing same trouble