Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhilipe Mulet2001-10-09 10:38:29 +0000
committerPhilipe Mulet2001-10-09 10:38:29 +0000
commite719dd5a3586c01e5265dc68f8e6023c180424cf (patch)
tree8dc2afb269d6c52a266ccc2fc04e25ffd69f96c4
parentb1ae1329170704a653622075caf9054b53c5ea54 (diff)
downloadeclipse.jdt.core-e719dd5a3586c01e5265dc68f8e6023c180424cf.tar.gz
eclipse.jdt.core-e719dd5a3586c01e5265dc68f8e6023c180424cf.tar.xz
eclipse.jdt.core-e719dd5a3586c01e5265dc68f8e6023c180424cf.zip
*** empty log message ***
-rw-r--r--org.eclipse.jdt.core/changes.txt1
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/BlockScope.java10
2 files changed, 9 insertions, 2 deletions
diff --git a/org.eclipse.jdt.core/changes.txt b/org.eclipse.jdt.core/changes.txt
index a3dc8468c9..53178286b5 100644
--- a/org.eclipse.jdt.core/changes.txt
+++ b/org.eclipse.jdt.core/changes.txt
@@ -113,6 +113,7 @@ STREAM: 2.0
PRs Fixed in this Release
================================================================================
+ 1GKXCOM: ITPJCORE:WIN2000 - ClassCastException during inner class emulation
1GD07GK: ITPJUI:WIN98 - Code assist should qualify methods if needed.
1GL1HF8: ITPJCORE:WIN2000 - Missing implementation in the compiler compiling invalid code
1GL13OT: ITPJCORE:ALL - INameLookup should be removed
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/BlockScope.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/BlockScope.java
index 3cfd5918f7..44c00a09ee 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/BlockScope.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/BlockScope.java
@@ -275,7 +275,10 @@ public void emulateOuterAccess(LocalVariableBinding outerLocalVariable) {
public void emulateOuterAccess(ReferenceBinding targetEnclosingType, boolean useDirectReference) {
ReferenceBinding currentType = enclosingSourceType();
- if (currentType.isNestedType() && currentType != targetEnclosingType) {
+ if (currentType.isNestedType()
+ && currentType != targetEnclosingType
+ && !targetEnclosingType.isSuperclassOf(currentType)) {
+
NestedTypeBinding currentNestedType = (NestedTypeBinding) currentType;
if (useDirectReference) {
// the target enclosing type is not in scope, we directly refer it
@@ -293,7 +296,10 @@ public void emulateOuterAccess(ReferenceBinding targetEnclosingType, boolean use
else
currentNestedType.addSyntheticArgumentAndField(currentType);
// further indirect cases
- while (currentType != targetEnclosingType && !targetEnclosingType.isSuperclassOf(currentType)) {
+ while (currentType.isNestedType()
+ && currentType != targetEnclosingType
+ && !targetEnclosingType.isSuperclassOf(currentType)) {
+
currentNestedType = (NestedTypeBinding) currentType;
currentType = currentNestedType.enclosingType;
currentNestedType.addSyntheticArgumentAndField(currentType);

Back to the top