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 160664 Details for
Bug 247201
[validation] bugs in JavaScript objects validation
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]
patch
patchFor247201 (text/plain), 6.48 KB, created by
Chris Jaun
on 2010-03-02 13:40:44 EST
(
hide
)
Description:
patch
Filename:
MIME Type:
Creator:
Chris Jaun
Created:
2010-03-02 13:40:44 EST
Size:
6.48 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.wst.jsdt.core >Index: src/org/eclipse/wst/jsdt/internal/compiler/ast/NameReference.java >=================================================================== >RCS file: /cvsroot/webtools/org.eclipse.jsdt/plugins/org.eclipse.wst.jsdt.core/src/org/eclipse/wst/jsdt/internal/compiler/ast/NameReference.java,v >retrieving revision 1.8 >diff -u -r1.8 NameReference.java >--- src/org/eclipse/wst/jsdt/internal/compiler/ast/NameReference.java 30 Apr 2008 21:32:18 -0000 1.8 >+++ src/org/eclipse/wst/jsdt/internal/compiler/ast/NameReference.java 2 Mar 2010 18:39:04 -0000 >@@ -1,5 +1,5 @@ > /******************************************************************************* >- * Copyright (c) 2000, 2008 IBM Corporation and others. >+ * Copyright (c) 2000, 2010 IBM Corporation and others. > * All rights reserved. This program and the accompanying materials > * are made available under the terms of the Eclipse Public License v1.0 > * which accompanies this distribution, and is available at >@@ -15,7 +15,9 @@ > import org.eclipse.wst.jsdt.internal.compiler.lookup.Binding; > import org.eclipse.wst.jsdt.internal.compiler.lookup.FieldBinding; > >+import org.eclipse.wst.jsdt.internal.compiler.lookup.FunctionTypeBinding; > import org.eclipse.wst.jsdt.internal.compiler.lookup.InvocationSite; >+import org.eclipse.wst.jsdt.internal.compiler.lookup.LocalVariableBinding; > import org.eclipse.wst.jsdt.internal.compiler.lookup.MethodBinding; > import org.eclipse.wst.jsdt.internal.compiler.lookup.ReferenceBinding; > import org.eclipse.wst.jsdt.internal.compiler.lookup.TypeBinding; >@@ -77,6 +79,13 @@ > { > MethodBinding constructorBinding=(MethodBinding)alternateBinding; > alternateBinding=constructorBinding.returnType; >+ } else if(alternateBinding instanceof LocalVariableBinding) { >+ if(((LocalVariableBinding)alternateBinding).type instanceof FunctionTypeBinding) { >+ FunctionTypeBinding functionBinding = (FunctionTypeBinding)((LocalVariableBinding)alternateBinding).type; >+ if(functionBinding.functionBinding.isConstructor()) { >+ alternateBinding = functionBinding.functionBinding.returnType; >+ } >+ } > } > > return alternateBinding; >Index: src/org/eclipse/wst/jsdt/internal/compiler/ast/FieldReference.java >=================================================================== >RCS file: /cvsroot/webtools/org.eclipse.jsdt/plugins/org.eclipse.wst.jsdt.core/src/org/eclipse/wst/jsdt/internal/compiler/ast/FieldReference.java,v >retrieving revision 1.43 >diff -u -r1.43 FieldReference.java >--- src/org/eclipse/wst/jsdt/internal/compiler/ast/FieldReference.java 26 Feb 2010 19:01:51 -0000 1.43 >+++ src/org/eclipse/wst/jsdt/internal/compiler/ast/FieldReference.java 2 Mar 2010 18:39:04 -0000 >@@ -432,6 +432,9 @@ > && fieldBinding.declaringClass.canBeSeenBy(scope)) { > scope.problemReporter().indirectAccessToStaticField(this, fieldBinding); > } >+ } else { >+ if(receiverIsType) >+ scope.problemReporter().staticFieldAccessToNonStaticVariable(this, fieldBinding); > } > // perform capture conversion if read access > return this.resolvedType = fieldBinding.type; >Index: src/org/eclipse/wst/jsdt/internal/compiler/ast/SingleNameReference.java >=================================================================== >RCS file: /cvsroot/webtools/org.eclipse.jsdt/plugins/org.eclipse.wst.jsdt.core/src/org/eclipse/wst/jsdt/internal/compiler/ast/SingleNameReference.java,v >retrieving revision 1.39 >diff -u -r1.39 SingleNameReference.java >--- src/org/eclipse/wst/jsdt/internal/compiler/ast/SingleNameReference.java 12 Jan 2010 15:20:53 -0000 1.39 >+++ src/org/eclipse/wst/jsdt/internal/compiler/ast/SingleNameReference.java 2 Mar 2010 18:39:04 -0000 >@@ -391,13 +391,13 @@ > // scope.problemReporter().cannotReferToNonFinalOuterLocal((LocalVariableBinding)variable, this); > // } > TypeBinding fieldType = variable.type; >- if (fieldType.isAnonymousType() && !fieldType.isObjectLiteralType()) { >- LocalDeclaration declaration = ((LocalVariableBinding)binding).declaration; >- if(declaration != null && !(declaration.getInitialization() instanceof AllocationExpression) && >- ! (declaration.getInitialization() instanceof Literal)) { >- bits |= Binding.TYPE; >- } >- } >+// if (fieldType.isAnonymousType() && !fieldType.isObjectLiteralType()) { >+// LocalDeclaration declaration = ((LocalVariableBinding)binding).declaration; >+// if(declaration != null && !(declaration.getInitialization() instanceof AllocationExpression) && >+// ! (declaration.getInitialization() instanceof Literal)) { >+// bits |= Binding.TYPE; >+// } >+// } > > if (useType!=null && !(useType.id==T_null ||useType.id==T_any)) > { >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.20 >diff -u -r1.20 OperatorExpression.java >--- src/org/eclipse/wst/jsdt/internal/compiler/ast/OperatorExpression.java 1 Mar 2010 20:46:54 -0000 1.20 >+++ src/org/eclipse/wst/jsdt/internal/compiler/ast/OperatorExpression.java 2 Mar 2010 18:39:04 -0000 >@@ -1472,7 +1472,7 @@ > // table[(T_JavaLangString<<4)+T_undefined] = T_undefined; > table[(T_JavaLangString<<4)+T_long] = (String2String<<12)+(Long2Long<<4)+T_JavaLangString; > table[(T_JavaLangString<<4)+T_short] = (String2String<<12)+(Short2Short<<4)+T_JavaLangString; >- // table[(T_JavaLangString<<4)+T_void] = T_undefined; >+ table[(T_JavaLangString<<4)+T_void] = T_JavaLangString; > table[(T_JavaLangString<<4)+T_JavaLangString] = (String2String<<12)+(String2String<<4)+T_JavaLangString; > table[(T_JavaLangString<<4)+T_JavaLangObject] = (String2String<<12)+(Object2Object<<4)+T_JavaLangString; > table[(T_JavaLangString<<4)+T_double] = (String2String<<12)+(Double2Double<<4)+T_JavaLangString; >@@ -1482,6 +1482,7 @@ > table[(T_JavaLangString<<4)+T_int] = (String2String<<12)+(Int2Int<<4)+T_JavaLangString; > table[(T_JavaLangString<<4)+T_null] = (String2String<<12)+(T_null<<8)+(T_null<<4)+T_JavaLangString; > table[(T_JavaLangString<<4)+T_any] = T_JavaLangString; >+ table[(T_JavaLangString<<4)+T_function] = T_any; > > // table[(T_Object<<4)+T_undefined] = T_undefined; > // table[(T_Object<<4)+T_byte] = T_undefined;
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 247201
: 160664