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

TokenTreeBuilder crash with Map / Hash conditional #252

Closed
Gama11 opened this issue Apr 16, 2016 · 0 comments · Fixed by #298
Closed

TokenTreeBuilder crash with Map / Hash conditional #252

Gama11 opened this issue Apr 16, 2016 · 0 comments · Fixed by #298
Assignees

Comments

@Gama11
Copy link
Member

Gama11 commented Apr 16, 2016

This sort of thing is seen every now and then for backwards-compatibility with Haxe 2:

class Foo {
    var library = new #if haxe3 Map<String, #else Hash <#end String>();
}
./source/Test.hx:2: characters 58-64: bad token Const(CIdent(String)) != POpen
Stacktrace: 
Called from checkstyle.token.TokenStream::consumeTokenDef line 50
Called from checkstyle.token.walk.WalkPOpen::walkPOpen line 13
Called from checkstyle.token.walk.WalkNew::walkNew line 15
Called from checkstyle.token.walk.WalkStatement::walkKeyword line 107
Called from checkstyle.token.walk.WalkStatement::walkStatement line 37
Called from checkstyle.token.walk.WalkStatement::walkStatement line 73
Called from checkstyle.token.walk.WalkVar::walkVar line 30
Called from checkstyle.token.walk.WalkClass::walkClass line 32
Called from checkstyle.token.walk.WalkType::walkType line 14
Called from checkstyle.token.walk.WalkFile::walkFile line 27
Called from checkstyle.token.TokenTreeBuilder::buildTokenTree line 14
Called from checkstyle.Checker::getTokenTree line 55
Called from checkstyle.checks.whitespace.WhitespaceAfterCheck::checkTokens line 88
Called from checkstyle.checks.whitespace.WhitespaceAfterCheck::actualRun line 84
Called from checkstyle.checks.Check::run line 41

AlexHaxe added a commit to AlexHaxe/haxe-checkstyle that referenced this issue Oct 8, 2016
AlexHaxe added a commit that referenced this issue Oct 8, 2016
fixes #76, resolves #79, fixed #238 and resolved #252
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants