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:
parent
a5b43c9ac5
commit
aeb075a51b
1 changed files with 13 additions and 0 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue