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 114053 Details for
Bug 249107
[compiler] IllegalAccessError in presence of synthetic field access
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
More patch
249107complement3.txt (text/plain), 4.92 KB, created by
Philipe Mulet
on 2008-10-01 18:26:14 EDT
(
hide
)
Description:
More patch
Filename:
MIME Type:
Creator:
Philipe Mulet
Created:
2008-10-01 18:26:14 EDT
Size:
4.92 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.core.tests.compiler >Index: src/org/eclipse/jdt/core/tests/compiler/regression/InnerEmulationTest.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/InnerEmulationTest.java,v >retrieving revision 1.46 >diff -u -r1.46 InnerEmulationTest.java >--- src/org/eclipse/jdt/core/tests/compiler/regression/InnerEmulationTest.java 1 Oct 2008 21:15:39 -0000 1.46 >+++ src/org/eclipse/jdt/core/tests/compiler/regression/InnerEmulationTest.java 1 Oct 2008 22:25:37 -0000 >@@ -6965,6 +6965,46 @@ > }, > "X.this.method()=[X#method()]X.super.method()=[XInternal#method()]"); > } >+//https://bugs.eclipse.org/bugs/show_bug.cgi?id=249107 - variation >+public void test170() throws Exception { >+ this.runConformTest(new String[] { >+ "X.java",//======================= >+ "public class X {\n" + >+ " class Member {\n" + >+ " private String field = \"SUCCESS\";\n" + >+ " }\n" + >+ " class SubMember extends Member {\n" + >+ " void foo() {\n" + >+ " System.out.println(super.field);\n" + >+ " }\n" + >+ " } \n" + >+ " public static void main(String argv[]) {\n" + >+ " new X().new SubMember().foo(); \n" + >+ " }\n" + >+ "}\n", >+ }, >+ "SUCCESS"); >+} >+//https://bugs.eclipse.org/bugs/show_bug.cgi?id=249107 - variation >+public void test171() throws Exception { >+ this.runConformTest(new String[] { >+ "X.java",//======================= >+ "public class X {\n" + >+ " class Member {\n" + >+ " private String method() { return \"SUCCESS\"; }\n" + >+ " }\n" + >+ " class SubMember extends Member {\n" + >+ " void foo() {\n" + >+ " System.out.println(super.method());\n" + >+ " }\n" + >+ " } \n" + >+ " public static void main(String argv[]) {\n" + >+ " new X().new SubMember().foo(); \n" + >+ " }\n" + >+ "}\n", >+ }, >+ "SUCCESS"); >+} > public static Class testClass() { > return InnerEmulationTest.class; > } >#P org.eclipse.jdt.core >Index: compiler/org/eclipse/jdt/internal/compiler/ast/FieldReference.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/FieldReference.java,v >retrieving revision 1.123 >diff -u -r1.123 FieldReference.java >--- compiler/org/eclipse/jdt/internal/compiler/ast/FieldReference.java 1 Oct 2008 21:16:38 -0000 1.123 >+++ compiler/org/eclipse/jdt/internal/compiler/ast/FieldReference.java 1 Oct 2008 22:25:42 -0000 >@@ -419,15 +419,13 @@ > if (this.syntheticAccessors == null) > this.syntheticAccessors = new MethodBinding[2]; > this.syntheticAccessors[isReadAccess ? FieldReference.READ : FieldReference.WRITE] = >- ((SourceTypeBinding) codegenBinding.declaringClass).addSyntheticMethod(codegenBinding, isReadAccess, isSuperAccess()); >+ ((SourceTypeBinding) codegenBinding.declaringClass).addSyntheticMethod(codegenBinding, isReadAccess, false /* not super ref in remote type*/); > currentScope.problemReporter().needToEmulateFieldAccess(codegenBinding, this, isReadAccess); > return; > } > } else if (this.receiver instanceof QualifiedSuperReference) { // qualified super > // qualified super need emulation always >- SourceTypeBinding destinationType = >- (SourceTypeBinding) (((QualifiedSuperReference) this.receiver) >- .currentCompatibleType); >+ SourceTypeBinding destinationType = (SourceTypeBinding) (((QualifiedSuperReference) this.receiver).currentCompatibleType); > if (this.syntheticAccessors == null) > this.syntheticAccessors = new MethodBinding[2]; > this.syntheticAccessors[isReadAccess ? FieldReference.READ : FieldReference.WRITE] = destinationType.addSyntheticMethod(codegenBinding, isReadAccess, isSuperAccess()); >Index: compiler/org/eclipse/jdt/internal/compiler/ast/MessageSend.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/MessageSend.java,v >retrieving revision 1.136 >diff -u -r1.136 MessageSend.java >--- compiler/org/eclipse/jdt/internal/compiler/ast/MessageSend.java 30 Sep 2008 15:31:25 -0000 1.136 >+++ compiler/org/eclipse/jdt/internal/compiler/ast/MessageSend.java 1 Oct 2008 22:25:43 -0000 >@@ -207,8 +207,7 @@ > > // depth is set for both implicit and explicit access (see MethodBinding#canBeSeenBy) > if (currentScope.enclosingSourceType() != codegenBinding.declaringClass){ >- >- this.syntheticAccessor = ((SourceTypeBinding)codegenBinding.declaringClass).addSyntheticMethod(codegenBinding, isSuperAccess()); >+ this.syntheticAccessor = ((SourceTypeBinding)codegenBinding.declaringClass).addSyntheticMethod(codegenBinding, false /* not super access there */); > currentScope.problemReporter().needToEmulateMethodAccess(codegenBinding, this); > return; > }
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 249107
:
113888
|
114016
| 114053