Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 249598 Details for
Bug 455986
ASTParser ignores call to super() in K_STATEMENTS mode
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
Proposed regression test
patch_455986_tests.txt (text/plain), 1.88 KB, created by
Olivier Thomann
on 2014-12-22 14:01:03 EST
(
hide
)
Description:
Proposed regression test
Filename:
MIME Type:
Creator:
Olivier Thomann
Created:
2014-12-22 14:01:03 EST
Size:
1.88 KB
patch
obsolete
>diff --git a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterTestAST3_2.java b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterTestAST3_2.java >index 29a079d..463e65a 100644 >--- a/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterTestAST3_2.java >+++ b/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterTestAST3_2.java >@@ -92,6 +92,7 @@ > import org.eclipse.jdt.core.dom.SingleVariableDeclaration; > import org.eclipse.jdt.core.dom.Statement; > import org.eclipse.jdt.core.dom.StringLiteral; >+import org.eclipse.jdt.core.dom.SuperConstructorInvocation; > import org.eclipse.jdt.core.dom.SuperFieldAccess; > import org.eclipse.jdt.core.dom.SuperMethodInvocation; > import org.eclipse.jdt.core.dom.SwitchCase; >@@ -10646,4 +10647,26 @@ > Object o = resultCompilationUnit.types().get(0); > assertEquals(o.toString(), source); > } >+ /** >+ * https://bugs.eclipse.org/bugs/show_bug.cgi?id=455986 >+ */ >+ public void test0723() { >+ String src = "super();"; >+ char[] source = src.toCharArray(); >+ ASTParser parser = ASTParser.newParser(getJLS3()); >+ parser.setKind (ASTParser.K_STATEMENTS); >+ parser.setIgnoreMethodBodies(true); >+ parser.setSource (source); >+ ASTNode result = parser.createAST (null); >+ assertNotNull("no result", result); >+ assertEquals("Wrong type", ASTNode.BLOCK, result.getNodeType()); >+ Block block = (Block) result; >+ List statements = block.statements(); >+ assertNotNull("No statements", statements); >+ assertEquals("Wrong size", 1, statements.size()); >+ final ASTNode node = (ASTNode) statements.get(0); >+ assertEquals("Not a super constructor call", ASTNode.SUPER_CONSTRUCTOR_INVOCATION, node.getNodeType()); >+ SuperConstructorInvocation statement = (SuperConstructorInvocation) node; >+ checkSourceRange(statement, "super();", source); >+ } > } >\ No newline at end of file
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 455986
:
249597
| 249598