/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
* @test
* @bug 7043922
* @summary Regression: internal compiler error for nested anonymous inner class featuring varargs constructor
*/
public class T7043922 {
this.classKinds = classKinds;
this.constructorKinds = constructorKinds;
}
if (ec.errorFound) {
throw new Error("invalid diagnostics for source:\n" +
source.getCharContent(true) +
}
}
"#C1 A1 { #K1 }\n" +
"#C2 A2 { #K2 }\n" +
"class D {\n" +
" void test() {\n" +
" new A0(#V0) {\n" +
" void test() {\n" +
" new A1(#V1) {\n" +
" void test() {\n" +
" new A2(#V2) {};\n" +
" }\n" +
" };\n" +
" }\n" +
" };\n" +
" }\n" +
"}\n";
public JavaSource() {
for (int i = 0; i < 3; i++) {
}
}
return source;
}
}
/** global decls ***/
enum ConstructorKind {
this.constrParam = constrParam;
this.constrArgs = constrArgs;
}
}
enum ClassKind {
}
return this != INTERFACE ||
}
return this == INTERFACE ?
"" :
}
}
// Create a single file manager and JavaCompiler tool
// and reuse them for each compile to save time.
static final StandardJavaFileManager fm = JavacTool.create().getStandardFileManager(null, null, null);
}
}
}
}
}
}
}
boolean errorFound;
errorFound = true;
}
}
}
}
}
}