Просмотр исходного кода

fix for Bugzilla Bug 52928

 	Private members introduced via an interface are visible to the class
tags/Root_ajdt_support
acolyer 20 лет назад
Родитель
Сommit
5795b4afc6
4 измененных файлов: 33 добавлений и 1 удалений
  1. Двоичные данные
      org.eclipse.jdt.core/jdtcore-for-aspectj-src.zip
  2. Двоичные данные
      org.eclipse.jdt.core/jdtcore-for-aspectj.jar
  3. 9
    1
      tests/ajcTests.xml
  4. 24
    0
      tests/bugs/VisiblePrivateInterfaceITDs.java

Двоичные данные
org.eclipse.jdt.core/jdtcore-for-aspectj-src.zip Просмотреть файл


Двоичные данные
org.eclipse.jdt.core/jdtcore-for-aspectj.jar Просмотреть файл


+ 9
- 1
tests/ajcTests.xml Просмотреть файл

@@ -7502,5 +7502,13 @@
</inc-compile>
</ajc-test>

<ajc-test dir="bugs"
title="Private members introduced via an interface are visible to the class"
pr="52928">
<compile
files="VisiblePrivateInterfaceITDs.java" >
<message kind="error" line="13"/>
</compile>
</ajc-test>
</suite>

+ 24
- 0
tests/bugs/VisiblePrivateInterfaceITDs.java Просмотреть файл

@@ -0,0 +1,24 @@
// PR 52928

public class VisiblePrivateInterfaceITDs {

public static void main(String[] args) {
VisiblePrivateInterfaceITDs s = new VisiblePrivateInterfaceITDs();
s.aMethod();
}

public void aMethod() {
// x is introduced by the following aspect as private
// so it should not be accessible here
System.out.println("I have " + x); // CE 13
}

}

aspect SampleAspect {
private interface Tag {};
private int Tag.x = 0;
declare parents: VisiblePrivateInterfaceITDs implements Tag;
}

Загрузка…
Отмена
Сохранить