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 77025 Details for
Bug 190622
type binding marked as recovered but all is compiling
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Regression test
patch_190622_tests.txt (text/plain), 3.72 KB, created by
Olivier Thomann
on 2007-08-27 09:33:05 EDT
(
hide
)
Description:
Regression test
Filename:
MIME Type:
Creator:
Olivier Thomann
Created:
2007-08-27 09:33:05 EDT
Size:
3.72 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.core.tests.model >Index: src/org/eclipse/jdt/core/tests/dom/ASTConverter15Test.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverter15Test.java,v >retrieving revision 1.251 >diff -u -r1.251 ASTConverter15Test.java >--- src/org/eclipse/jdt/core/tests/dom/ASTConverter15Test.java 24 Aug 2007 14:45:54 -0000 1.251 >+++ src/org/eclipse/jdt/core/tests/dom/ASTConverter15Test.java 24 Aug 2007 16:10:31 -0000 >@@ -46,7 +46,7 @@ > } > > static { >-// TESTS_NUMBERS = new int[] { 281 }; >+// TESTS_NUMBERS = new int[] { 282 }; > // TESTS_RANGE = new int[] { 277, -1 }; > // TESTS_NAMES = new String[] {"test0204"}; > } >@@ -9344,4 +9344,58 @@ > IAnnotationBinding[] annotations = typeBinding.getAnnotations(); > assertEquals("wrong size", 1, annotations.length); > } >+ >+ // https://bugs.eclipse.org/bugs/show_bug.cgi?id=190622 >+ public void test0282() throws JavaModelException { >+ String contents = >+ "public class X {\n" + >+ " public @interface Moo {\n" + >+ " Class<?> value();\n" + >+ " }\n" + >+ " @Moo(Bar.Baz.class)\n" + >+ " public static class Bar {\n" + >+ " public static class Baz {\n" + >+ " }\n" + >+ " }\n" + >+ "}"; >+ workingCopy = getWorkingCopy("/Converter15/src/X.java", true/*resolve*/); >+ workingCopy.getBuffer().setContents(contents); >+ ASTNode node = runConversion(AST.JLS3, workingCopy, true, true, true); >+ assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType()); >+ CompilationUnit unit = (CompilationUnit) node; >+ assertProblemsSize(unit, 0); >+ node = getASTNode(unit, 0, 1); >+ assertEquals("Not a type declaration", ASTNode.TYPE_DECLARATION, node.getNodeType()); >+ TypeDeclaration typeDeclaration = (TypeDeclaration) node; >+ final List modifiers = typeDeclaration.modifiers(); >+ assertEquals("Wrong size", 3, modifiers.size()); >+ IExtendedModifier extendedModifier = (IExtendedModifier) modifiers.get(0); >+ assertTrue("Not an annotation", extendedModifier instanceof SingleMemberAnnotation); >+ SingleMemberAnnotation annotation = (SingleMemberAnnotation) extendedModifier; >+ final Expression value = annotation.getValue(); >+ assertEquals("Not a type literal", ASTNode.TYPE_LITERAL, value.getNodeType()); >+ TypeLiteral typeLiteral = (TypeLiteral) value; >+ final Type type = typeLiteral.getType(); >+ assertEquals("Not a simple type", ASTNode.SIMPLE_TYPE, type.getNodeType()); >+ SimpleType simpleType = (SimpleType) type; >+ final Name name = simpleType.getName(); >+ assertEquals("Not a qualified name", ASTNode.QUALIFIED_NAME, name.getNodeType()); >+ QualifiedName qualifiedName = (QualifiedName) name; >+ final IBinding binding = qualifiedName.resolveBinding(); >+ assertNotNull("No binding", binding); >+ assertEquals("Wrong value", "Bar.Baz", qualifiedName.getFullyQualifiedName()); >+ final SimpleName simpleName = qualifiedName.getName(); >+ final IBinding binding2 = simpleName.resolveBinding(); >+ assertNotNull("No binding2", binding2); >+ assertFalse("Not a recovered binding", binding2.isRecovered()); >+ final Name qualifier = qualifiedName.getQualifier(); >+ assertEquals("Not a simple name", ASTNode.SIMPLE_NAME, qualifier.getNodeType()); >+ SimpleName simpleName2 = (SimpleName) qualifier; >+ final IBinding binding3 = simpleName2.resolveBinding(); >+ assertNotNull("No binding3", binding3); >+ assertFalse("Not a recovered binding", binding3.isRecovered()); >+ final IJavaElement javaElement = binding3.getJavaElement(); >+ assertNotNull("No java element", javaElement); >+ assertEquals("Not a type", IJavaElement.TYPE, javaElement.getElementType()); >+ } > }
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 190622
:
77024
| 77025