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 16622 Details for
Bug 81023
[1.5] Wrong position for class instance creation with type parameters
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Apply on HEAD
patch_81023_tests.txt (text/plain), 2.38 KB, created by
Olivier Thomann
on 2004-12-14 22:25:47 EST
(
hide
)
Description:
Apply on HEAD
Filename:
MIME Type:
Creator:
Olivier Thomann
Created:
2004-12-14 22:25:47 EST
Size:
2.38 KB
patch
obsolete
>Index: src/org/eclipse/jdt/core/tests/dom/ASTConverter15Test.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverter15Test.java,v >retrieving revision 1.78 >diff -u -r1.78 ASTConverter15Test.java >--- src/org/eclipse/jdt/core/tests/dom/ASTConverter15Test.java 14 Dec 2004 18:45:24 -0000 1.78 >+++ src/org/eclipse/jdt/core/tests/dom/ASTConverter15Test.java 15 Dec 2004 02:58:57 -0000 >@@ -84,11 +84,11 @@ > } > > public static Test suite() { >- if (true) { >+ if (false) { > return new Suite(ASTConverter15Test.class); > } > TestSuite suite = new Suite(ASTConverter15Test.class.getName()); >- suite.addTest(new ASTConverter15Test("test0092")); >+ suite.addTest(new ASTConverter15Test("test0093")); > return suite; > } > >@@ -2811,6 +2811,41 @@ > workingCopy, > false); > assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType()); >+ } finally { >+ if (workingCopy != null) >+ workingCopy.discardWorkingCopy(); >+ } >+ } >+ >+ /* >+ * https://bugs.eclipse.org/bugs/show_bug.cgi?id=81023 >+ */ >+ public void test0093() throws JavaModelException { >+ ICompilationUnit workingCopy = null; >+ try { >+ String contents = >+ "public class Test {\n" + >+ " public <U> Test(U u) {\n" + >+ " }\n" + >+ "\n" + >+ " void bar() {\n" + >+ " new <String> Test(null) {};\n" + >+ " }\n" + >+ "}"; >+ workingCopy = getWorkingCopy("/Converter15/src/Test.java", true/*resolve*/); >+ ASTNode node = buildAST( >+ contents, >+ workingCopy); >+ assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType()); >+ CompilationUnit compilationUnit = (CompilationUnit) node; >+ node = getASTNode(compilationUnit, 0, 1, 0); >+ assertEquals("Not an expression statement", ASTNode.EXPRESSION_STATEMENT, node.getNodeType()); >+ ExpressionStatement statement = (ExpressionStatement) node; >+ Expression expression = statement.getExpression(); >+ checkSourceRange(expression, "new <String> Test(null) {}", contents.toCharArray()); >+ ITypeBinding typeBinding = expression.resolveTypeBinding(); >+ IJavaElement element = typeBinding.getJavaElement(); >+ assertNotNull("No java element", element); > } finally { > if (workingCopy != null) > workingCopy.discardWorkingCopy();
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 81023
:
16616
|
16622
|
16623