DefAssignBoolean_1.java revision 553:9d9f26857129
1141296Sdas/* 2141296Sdas * Copyright (c) 1999, Oracle and/or its affiliates. All rights reserved. 32116Sjkh * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 42116Sjkh * 52116Sjkh * This code is free software; you can redistribute it and/or modify it 62116Sjkh * under the terms of the GNU General Public License version 2 only, as 7141296Sdas * published by the Free Software Foundation. 82116Sjkh * 9141296Sdas * This code is distributed in the hope that it will be useful, but WITHOUT 102116Sjkh * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 112116Sjkh * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 12141296Sdas * version 2 for more details (a copy is included in the LICENSE file that 132116Sjkh * accompanied this code). 142116Sjkh * 15176451Sdas * You should have received a copy of the GNU General Public License version 16176451Sdas * 2 along with this work; if not, write to the Free Software Foundation, 172116Sjkh * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 182116Sjkh * 192116Sjkh * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20141296Sdas * or visit www.oracle.com if you need additional information or have any 212116Sjkh * questions. 222116Sjkh */ 232116Sjkh 242116Sjkh/* 252116Sjkh * @test 262116Sjkh * @bug 4262168 272116Sjkh * @summary Verify that certain unverifiable boolean expressions fail DA test. 282116Sjkh * @author maddox 292116Sjkh * 302116Sjkh * @run compile/fail DefAssignBoolean_1.java 312116Sjkh */ 32251599Sdas 33251599Sdaspublic class DefAssignBoolean_1 { 342116Sjkh 352116Sjkh public static void main(String[] args) { 362116Sjkh 378870Srgrimes boolean b3, b4; 382116Sjkh boolean r = false; 392116Sjkh boolean t = true; 402116Sjkh 4197407Salfred if ((t && (b3 = r)) == (r || (b3 = false))) 4297407Salfred r = b3; 438870Srgrimes } 442116Sjkh 452116Sjkh} 462116Sjkh