1583N/A/*
1583N/A * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
1583N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
1583N/A *
1583N/A * This code is free software; you can redistribute it and/or modify it
1583N/A * under the terms of the GNU General Public License version 2 only, as
1583N/A * published by the Free Software Foundation.
1583N/A *
1583N/A * This code is distributed in the hope that it will be useful, but WITHOUT
1583N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
1583N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
1583N/A * version 2 for more details (a copy is included in the LICENSE file that
1583N/A * accompanied this code).
1583N/A *
1583N/A * You should have received a copy of the GNU General Public License version
1583N/A * 2 along with this work; if not, write to the Free Software Foundation,
1583N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
1583N/A *
1583N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
1583N/A * or visit www.oracle.com if you need additional information or have any
1583N/A * questions.
1583N/A */
1583N/A
1583N/A/*
1583N/A * @test
1583N/A * @bug 4695463
1583N/A * @summary DA versus switch: javac allows reference to uninitialized variable
1583N/A * @author Neal Gafter (gafter)
1583N/A *
1583N/A * @compile/fail DASwitch.java
1583N/A */
1583N/A
1583N/Apublic class DASwitch {
1583N/A public static void main(final String[] args) {
1583N/A int t = 1;
1583N/A {
1583N/A final int x;
1583N/A x = 1;
1583N/A }
1583N/A switch(t) {
1583N/A case 0:
1583N/A Integer b;
1583N/A break;
1583N/A case 1:
1583N/A System.out.println(b.toString());
1583N/A }
1583N/A }
1583N/A}
1583N/A