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 169260 Details for
Bug 278172
[exceptions] ClassCastException (BaseTypeBinding can't be cast to ReferenceBinding) on incorrect JSDoc
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]
updated patch, includes JUnit and operator change
278172.patch (text/plain), 4.01 KB, created by
Nitin Dahyabhai
on 2010-05-19 23:51:01 EDT
(
hide
)
Description:
updated patch, includes JUnit and operator change
Filename:
MIME Type:
Creator:
Nitin Dahyabhai
Created:
2010-05-19 23:51:01 EDT
Size:
4.01 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.wst.jsdt.core >Index: src/org/eclipse/wst/jsdt/core/infer/InferEngine.java >=================================================================== >RCS file: /cvsroot/webtools/org.eclipse.jsdt/plugins/org.eclipse.wst.jsdt.core/src/org/eclipse/wst/jsdt/core/infer/InferEngine.java,v >retrieving revision 1.59 >diff -u -r1.59 InferEngine.java >--- src/org/eclipse/wst/jsdt/core/infer/InferEngine.java 20 May 2010 03:42:32 -0000 1.59 >+++ src/org/eclipse/wst/jsdt/core/infer/InferEngine.java 20 May 2010 03:50:28 -0000 >@@ -56,6 +56,7 @@ > import org.eclipse.wst.jsdt.internal.compiler.ast.ProgramElement; > import org.eclipse.wst.jsdt.internal.compiler.ast.SingleNameReference; > import org.eclipse.wst.jsdt.internal.compiler.ast.UnaryExpression; >+import org.eclipse.wst.jsdt.internal.compiler.lookup.TypeConstants; > import org.eclipse.wst.jsdt.internal.compiler.util.HashtableOfObject; > import org.eclipse.wst.jsdt.internal.compiler.util.Util; > >@@ -1340,7 +1341,9 @@ > { > char []name={}; > for (int j = 0; j < param.types.length; j++) { >- char []typeName=param.types[j].getSimpleTypeName(); >+ //char []typeName=param.types[j].getSimpleTypeName(); >+ //make sure we are using the type version of Boolean, even if the user entered boolean as the JSdoc type. >+ char []typeName=changePrimitiveToObject(param.types[j].getSimpleTypeName()); > if (j==0) > name=typeName; > else >@@ -1855,5 +1858,12 @@ > { > return compUnit.findInferredType(className); > } >+ >+ protected char[] changePrimitiveToObject(char[] name) { >+ //Changes the first character of the name of the primitive types to uppercase. This will allow future reference to the object wrapper instead of the primitive type. >+ if(CharOperation.equals(name, TypeConstants.BOOLEAN, false)) //$NON-NLS-1$ >+ return BooleanType.getName(); >+ return name; >+ } > > } >Index: src/org/eclipse/wst/jsdt/internal/compiler/ast/OperatorExpression.java >=================================================================== >RCS file: /cvsroot/webtools/org.eclipse.jsdt/plugins/org.eclipse.wst.jsdt.core/src/org/eclipse/wst/jsdt/internal/compiler/ast/OperatorExpression.java,v >retrieving revision 1.21 >diff -u -r1.21 OperatorExpression.java >--- src/org/eclipse/wst/jsdt/internal/compiler/ast/OperatorExpression.java 2 Mar 2010 18:41:26 -0000 1.21 >+++ src/org/eclipse/wst/jsdt/internal/compiler/ast/OperatorExpression.java 20 May 2010 03:50:28 -0000 >@@ -513,7 +513,7 @@ > // table[(T_boolean<<4)+T_short] = T_undefined; > // table[(T_boolean<<4)+T_void] = T_undefined; > table[(T_boolean<<4)+T_JavaLangString] = T_JavaLangString; >- // table[(T_boolean<<4)+T_Object] = T_undefined; >+ table[(T_boolean<<4)+T_JavaLangObject] = T_JavaLangObject; > // table[(T_boolean<<4)+T_double] = T_undefined; > // table[(T_boolean<<4)+T_float] = T_undefined; > table[(T_boolean<<4)+T_boolean] = (Boolean2Boolean<<12)+(Boolean2Boolean<<4)+T_boolean; >#P org.eclipse.wst.jsdt.core.tests.compiler >Index: src/org/eclipse/wst/jsdt/core/tests/compiler/regression/BasicResolveTests.java >=================================================================== >RCS file: /cvsroot/webtools/org.eclipse.jsdt/tests/org.eclipse.wst.jsdt.core.tests.compiler/src/org/eclipse/wst/jsdt/core/tests/compiler/regression/BasicResolveTests.java,v >retrieving revision 1.45 >diff -u -r1.45 BasicResolveTests.java >--- src/org/eclipse/wst/jsdt/core/tests/compiler/regression/BasicResolveTests.java 20 May 2010 03:42:29 -0000 1.45 >+++ src/org/eclipse/wst/jsdt/core/tests/compiler/regression/BasicResolveTests.java 20 May 2010 03:50:28 -0000 >@@ -1713,5 +1713,22 @@ > "" > ); > } >+ >+ public void testbug278172() { >+ this.runNegativeTest( >+ new String[] { >+ "Z.js", >+ "/**\n" + >+ "* @param {boolean} options\n" + >+ "*/\n" + >+ "function foo(options) {\n" + >+ "options = options || {};\n" + >+ "if (!options.bar)\n" + >+ "options.bar = 42;\n" + >+ "}" >+ }, >+ "" >+ ); >+ } > > } >\ 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 278172
:
137449
|
137450
|
166271
|
168988
|
169117
|
169259
| 169260