Lines 7-13
Link Here
|
7 |
* |
7 |
* |
8 |
* Contributors: |
8 |
* Contributors: |
9 |
* IBM Corporation - initial API and implementation |
9 |
* IBM Corporation - initial API and implementation |
10 |
* Stephan Herrmann <stephan@cs.tu-berlin.de> - Contribution for bug 185682 - Increment/decrement operators mark local variables as read |
10 |
* Stephan Herrmann <stephan@cs.tu-berlin.de> - Contributions for |
|
|
11 |
* bug 185682 - Increment/decrement operators mark local variables as read |
12 |
* bug 328281 - visibility leaks not detected when analyzing unused field in private class |
11 |
*******************************************************************************/ |
13 |
*******************************************************************************/ |
12 |
package org.eclipse.jdt.core.tests.compiler.regression; |
14 |
package org.eclipse.jdt.core.tests.compiler.regression; |
13 |
|
15 |
|
Lines 2120-2124
Link Here
|
2120 |
true/*shouldFlushOutputDirectory*/, |
2122 |
true/*shouldFlushOutputDirectory*/, |
2121 |
customOptions); |
2123 |
customOptions); |
2122 |
} |
2124 |
} |
|
|
2125 |
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=328281 |
2126 |
public void test0052() { |
2127 |
Map customOptions = getCompilerOptions(); |
2128 |
customOptions.put(CompilerOptions.OPTION_ReportUnusedPrivateMember, CompilerOptions.ERROR); |
2129 |
this.runConformTest( |
2130 |
new String[] { |
2131 |
"X.java", |
2132 |
"class X {\n" + |
2133 |
" Y y = new Y();\n" + |
2134 |
" private class Y {\n" + |
2135 |
" int abc;\n" + |
2136 |
" Y() {\n" + |
2137 |
" abc++;\n" + // not a relevant usage |
2138 |
" }\n" + |
2139 |
" }\n" + |
2140 |
" class Z extends Y {}\n" + // makes 'abc' externally accessible |
2141 |
"}" |
2142 |
}, |
2143 |
"", |
2144 |
null/*classLibraries*/, |
2145 |
true/*shouldFlushOutputDirectory*/, |
2146 |
null/*vmArguments*/, |
2147 |
customOptions, |
2148 |
null/*requestor*/); |
2149 |
} |
2123 |
|
2150 |
|
2124 |
} |
2151 |
} |