1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-25 18:05:33 +02:00

RESOLVED - bug 186018: [C99 parser] ClassCastException when parsing case statements

https://bugs.eclipse.org/bugs/show_bug.cgi?id=186018

Patch from Mike Kucera
This commit is contained in:
Chris Recoskie 2007-05-09 22:17:36 +00:00
parent a5b43c9ac5
commit aeb075a51b

View file

@ -3689,4 +3689,17 @@ public class AST2Tests extends AST2BaseTest {
for (int i = 0; i < LANGUAGES.length; i++)
parseAndCheckBindings( buffer.toString(), LANGUAGES[i], true);
}
public void testBug186018() throws Exception {
String code =
"int main() { \n" +
" switch(1) { \n" +
" case 1 : \n" +
" case 2 : \n" +
" printf(\"pantera rules\"); \n" +
" } \n" +
"}\n";
parseAndCheckBindings(code, ParserLanguage.C);
}
}